summaryrefslogtreecommitdiff
path: root/storage/tokudb/tokudb_math.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/tokudb/tokudb_math.h')
-rw-r--r--storage/tokudb/tokudb_math.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/tokudb/tokudb_math.h b/storage/tokudb/tokudb_math.h
index 0338bf3871e..99cebd5b1d1 100644
--- a/storage/tokudb/tokudb_math.h
+++ b/storage/tokudb/tokudb_math.h
@@ -59,7 +59,8 @@ TOKUDB_UNUSED(static uint64_t uint_add(
bool* over));
static uint64_t uint_add(uint64_t x, uint64_t y, uint length_bits, bool *over) {
uint64_t mask = uint_mask(length_bits);
- assert_always((x & ~mask) == 0 && (y & ~mask) == 0);
+ assert_always((x & ~mask) == 0);
+ assert_always((y & ~mask) == 0);
uint64_t s = (x + y) & mask;
*over = s < x; // check for overflow
return s;
@@ -75,7 +76,8 @@ TOKUDB_UNUSED(static uint64_t uint_sub(
bool* over));
static uint64_t uint_sub(uint64_t x, uint64_t y, uint length_bits, bool *over) {
uint64_t mask = uint_mask(length_bits);
- assert_always((x & ~mask) == 0 && (y & ~mask) == 0);
+ assert_always((x & ~mask) == 0);
+ assert_always((y & ~mask) == 0);
uint64_t s = (x - y) & mask;
*over = s > x; // check for overflow
return s;