mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] kernel/audit.c: use ARRAY_SIZE instead of sizeof/sizeof[0]
@ 2014-06-03 20:05 Fabian Frederick
  2014-06-13 20:52 ` Richard Guy Briggs
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-06-03 20:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, Eric Paris, Andrew Morton

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] kernel/audit.c: use ARRAY_SIZE instead of sizeof/sizeof[0]
  2014-06-03 20:05 [PATCH 1/1] kernel/audit.c: use ARRAY_SIZE instead of sizeof/sizeof[0] Fabian Frederick
@ 2014-06-13 20:52 ` Richard Guy Briggs
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Guy Briggs @ 2014-06-13 20:52 UTC (permalink / raw)
  To: Fabian Frederick; +Cc: linux-kernel, Eric Paris, Andrew Morton

On 14/06/03, Fabian Frederick wrote:
> Use kernel.h definition.

Thanks Fabian, I'll queue it.

> Cc: Eric Paris <eparis@redhat.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  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 <rbriggs@redhat.com>
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-13 20:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-03 20:05 [PATCH 1/1] kernel/audit.c: use ARRAY_SIZE instead of sizeof/sizeof[0] Fabian Frederick
2014-06-13 20:52 ` Richard Guy Briggs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®