Skip to contentSkip to conversation

testing/radix-tree: fix a macro expansion bug

PATCH New [email protected] 1 participant 1 message Jul 20, 2016 Xarray

lore
Share & tools
lore
#0 lore raw

PATCH 3/5 testing/radix-tree: fix a macro expansion bug

From: Dan Carpenter <[email protected]>
Subject: 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;

---

 tools/testing/radix-tree/tag_check.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/radix-tree/tag_check.c renamed from tools/testing/radix-tree/tag_check.c~testing-radix-tree-fix-a-macro-expansion-bug +1 -1
diff -puN tools/testing/radix-tree/tag_check.c~testing-radix-tree-fix-a-macro-expansion-bug tools/testing/radix-tree/tag_check.c
@@ -122,7 +122,7 @@ enum {
 	NODE_TAGGED = 2,
 };
 
-#define THRASH_SIZE		1000 * 1000
+#define THRASH_SIZE		(1000 * 1000)
 #define N 127
 #define BATCH	33
 

_