testing/radix-tree: fix a macro expansion bug
Subsystems (2)
PATCH 1/1 testing/radix-tree: fix a macro expansion bug
There are no parentheses around this macro and it causes a problem when we do:
index = rand() % THRASH_SIZE;
Signed-off-by Dan Carpenter <[email protected]>
tools/testing/radix-tree/tag_check.c +1 -1
@@ -122,7 +122,7 @@ enum { NODE_TAGGED = 2, }; -#define THRASH_SIZE 1000 * 1000 +#define THRASH_SIZE (1000 * 1000)#define N 127#define BATCH 33
Quoted 6 lines · Dan Carpenter
There are no parentheses around this macro and it causes a problem when we do:
index = rand() % THRASH_SIZE;Signed-off-by Dan Carpenter <[email protected]>
Acked-by Ross Zwisler <[email protected]>
Quoted 14 lines
tools/testing/radix-tree/tag_check.c +1
-1@@ -122,7 +122,7 @@ enum { NODE_TAGGED = 2, }; -#define THRASH_SIZE 1000 * 1000 +#define THRASH_SIZE (1000 * 1000)#define N 127#define BATCH 33