Skip to contentSkip to conversation

lib/test-kstrtox.c: use ARRAY_SIZE instead of sizeof/sizeof[0]

PATCH New Fabian Frederick 1 participant 1 message Jun 3, 2014 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/test-kstrtox.c: use ARRAY_SIZE instead of sizeof/sizeof[0]

Use kernel.h definition.

Cc Alexey Dobriyan <[email protected]>
Cc Andrew Morton <[email protected]>
---
 lib/test-kstrtox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/test-kstrtox.c +1 -1
index bea3f3f..4137bca 100644
@@ -3,7 +3,7 @@
 #include <linux/module.h>
 
 #define for_each_test(i, test)	\
-	for (i = 0; i < sizeof(test) / sizeof(test[0]); i++)
+	for (i = 0; i < ARRAY_SIZE(test); i++)
 
 struct test_fail {
 	const char *str;
Signature · 1 line
1.8.4.5