From: Fabian Frederick Date: Wed, 6 Aug 2014 23:09:33 +0000 (-0700) Subject: lib/test-kstrtox.c: use ARRAY_SIZE instead of sizeof/sizeof[0] X-Git-Tag: firefly_0821_release~176^2~3462^2~55 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=129965a916a8b659d7bb3b59877a3e8259bed5e3;p=firefly-linux-kernel-4.4.55.git lib/test-kstrtox.c: use ARRAY_SIZE instead of sizeof/sizeof[0] Use kernel.h definition. Signed-off-by: Fabian Frederick Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/test-kstrtox.c b/lib/test-kstrtox.c index bea3f3fa3f02..4137bca5f8e8 100644 --- a/lib/test-kstrtox.c +++ b/lib/test-kstrtox.c @@ -3,7 +3,7 @@ #include #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;