Skip to content

Commit

Permalink
lib/test-kstrtox.c: use ARRAY_SIZE instead of sizeof/sizeof[0]
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Fabian Frederick authored and torvalds committed Aug 7, 2014
1 parent 142cda5 commit 129965a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/test-kstrtox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 129965a

Please sign in to comment.