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

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]>
This commit is contained in:
Fabian Frederick 2014-08-06 16:09:33 -07:00 • committed by Linus Torvalds
commit 129965a916

View 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;