kernel/audit.c: use ARRAY_SIZE instead of sizeof/sizeof[0]
authorFabian Frederick <fabf@skynet.be>
Tue, 3 Jun 2014 20:05:10 +0000 (22:05 +0200)
committerEric Paris <eparis@redhat.com>
Tue, 23 Sep 2014 20:37:51 +0000 (16:37 -0400)
Use kernel.h definition.

Cc: Eric Paris <eparis@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
kernel/audit.c

index de991950091f15091eb16f59a46bc3018d91367e..8a82d481393d11b925cd791673995d50aaf64be8 100644 (file)
@@ -750,7 +750,7 @@ static int audit_set_feature(struct sk_buff *skb)
        struct audit_features *uaf;
        int i;
 
-       BUILD_BUG_ON(AUDIT_LAST_FEATURE + 1 > sizeof(audit_feature_names)/sizeof(audit_feature_names[0]));
+       BUILD_BUG_ON(AUDIT_LAST_FEATURE + 1 > ARRAY_SIZE(audit_feature_names));
        uaf = nlmsg_data(nlmsg_hdr(skb));
 
        /* if there is ever a version 2 we should handle that here */