From d2397817f12d246cfd88caefd6f12dfd3e2d2c17 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 10 May 2011 07:28:35 +0000 Subject: post: use ARRAY_SIZE We've got a handy dandy macro already for calculating the number of elements in an array, so use it. Signed-off-by: Mike Frysinger --- post/post.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'post/post.c') diff --git a/post/post.c b/post/post.c index ecea1e13a2..76602243e7 100644 --- a/post/post.c +++ b/post/post.c @@ -196,7 +196,7 @@ static void post_get_flags (int *test_flags) POST_CRITICAL }; char *var[] = { "post_poweron", "post_normal", "post_slowtest", "post_critical" }; - int varnum = sizeof (var) / sizeof (var[0]); + int varnum = ARRAY_SIZE(var); char list[128]; /* long enough for POST list */ char *name; char *s; -- cgit v1.2.1