lib/test-kstrtox.c: use ARRAY_SIZE instead of sizeof/sizeof[0]
authorFabian Frederick <[email protected]>
Wed, 6 Aug 2014 23:09:33 +0000 (16:09 -0700)
committerLinus Torvalds <[email protected]>
Thu, 7 Aug 2014 01:01:25 +0000 (18:01 -0700)
Use kernel.h definition.

Signed-off-by: Fabian Frederick <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
lib/test-kstrtox.c

index bea3f3fa3f02a920fb92b9293c0adf06d72a52a6..4137bca5f8e8e5008ca88b7fcb801096856eaf0c 100644 (file)
@@ -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;