]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
lib/test-kstrtox.c: use ARRAY_SIZE instead of sizeof/sizeof[0]
authorFabian Frederick <fabf@skynet.be>
Wed, 6 Aug 2014 23:09:33 +0000 (16:09 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Aug 2014 01:01:25 +0000 (18:01 -0700)
Use kernel.h definition.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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;