On 02/18/16 05:03, Bill Fischofer wrote:
+
+static odp_bool_t approx_eq32(uint32_t val, uint32_t correct)
+{
+ uint64_t low_bound, val_times_100, high_bound;
+
+ if (val == correct)
+ return true;
+
+ low_bound = 98 * (uint64_t)correct;
+ val_times_100 = 100 * (uint64_t)val;
+ high_bound = 102 * (uint64_t)correct;
+
+ if ((low_bound <= val_times_100) && (val_times_100 <= high_bound))
+ return true;
+ else
+ return false;
+}
usually checkpatch.pl warns that else word is not needed here.
I just realized that in some places in code we use TRUE and FALSE, in
other places it's true and false,
and current odp_bool_t is int and api does not say which exactly values
it wants to see.
Maxim.
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp