Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753983AbaFMUwP (ORCPT ); Fri, 13 Jun 2014 16:52:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44155 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752116AbaFMUwO (ORCPT ); Fri, 13 Jun 2014 16:52:14 -0400 Date: Fri, 13 Jun 2014 16:52:05 -0400 From: Richard Guy Briggs To: Fabian Frederick Cc: linux-kernel@vger.kernel.org, Eric Paris , Andrew Morton Subject: Re: [PATCH 1/1] kernel/audit.c: use ARRAY_SIZE instead of sizeof/sizeof[0] Message-ID: <20140613205205.GA19353@madcap2.tricolour.ca> References: <1401825910-8793-1-git-send-email-fabf@skynet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1401825910-8793-1-git-send-email-fabf@skynet.be> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/06/03, Fabian Frederick wrote: > Use kernel.h definition. Thanks Fabian, I'll queue it. > Cc: Eric Paris > Cc: Andrew Morton > Signed-off-by: Fabian Frederick > --- > kernel/audit.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/audit.c b/kernel/audit.c > index 47845c5..48e6e5d 100644 > --- a/kernel/audit.c > +++ b/kernel/audit.c > @@ -718,7 +718,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 */ > -- > 1.8.4.5 - RGB -- Richard Guy Briggs Senior Software Engineer, Kernel Security, AMER ENG Base Operating Systems, Red Hat Remote, Ottawa, Canada Voice: +1.647.777.2635, Internal: (81) 32635, Alt: +1.613.693.0684x3545 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/