public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
* [PATCH] Audit: Fix the format type for size_t variables
@ 2008-02-27 15:39 Paul Moore
  2008-02-27 16:22 ` Eric Paris
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Moore @ 2008-02-27 15:39 UTC (permalink / raw)
  To: linux-audit

Fix the following compiler warning by using "%zu" as defined in C99.

  CC      kernel/auditsc.o
  kernel/auditsc.c: In function 'audit_log_single_execve_arg':
  kernel/auditsc.c:1074: warning: format '%ld' expects type 'long int', but
  argument 4 has type 'size_t'

Signed-off-by: Paul Moore <paul.moore@hp.com>
---

 kernel/auditsc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 2087d6d..782262e 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1070,7 +1070,7 @@ static int audit_log_single_execve_arg(struct audit_context *context,
 		 * so we can be sure nothing was lost.
 		 */
 		if ((i == 0) && (too_long))
-			audit_log_format(*ab, "a%d_len=%ld ", arg_num,
+			audit_log_format(*ab, "a%d_len=%zu ", arg_num,
 					 has_cntl ? 2*len : len);
 
 		/*

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

* Re: [PATCH] Audit: Fix the format type for size_t variables
  2008-02-27 15:39 [PATCH] Audit: Fix the format type for size_t variables Paul Moore
@ 2008-02-27 16:22 ` Eric Paris
  2008-02-27 17:45   ` Paul Moore
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Paris @ 2008-02-27 16:22 UTC (permalink / raw)
  To: Paul Moore; +Cc: linux-audit

On Wed, 2008-02-27 at 10:39 -0500, Paul Moore wrote:
> Fix the following compiler warning by using "%zu" as defined in C99.
> 
>   CC      kernel/auditsc.o
>   kernel/auditsc.c: In function 'audit_log_single_execve_arg':
>   kernel/auditsc.c:1074: warning: format '%ld' expects type 'long int', but
>   argument 4 has type 'size_t'
> 
> Signed-off-by: Paul Moore <paul.moore@hp.com>

I would have sworn I already saw this patch go by.  But I don't see it
in Al's git tree.

Acked-by: Eric Paris <eparis@redhat.com>

> ---
> 
>  kernel/auditsc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/auditsc.c b/kernel/auditsc.c
> index 2087d6d..782262e 100644
> --- a/kernel/auditsc.c
> +++ b/kernel/auditsc.c
> @@ -1070,7 +1070,7 @@ static int audit_log_single_execve_arg(struct audit_context *context,
>  		 * so we can be sure nothing was lost.
>  		 */
>  		if ((i == 0) && (too_long))
> -			audit_log_format(*ab, "a%d_len=%ld ", arg_num,
> +			audit_log_format(*ab, "a%d_len=%zu ", arg_num,
>  					 has_cntl ? 2*len : len);
>  
>  		/*
> 
> --
> Linux-audit mailing list
> Linux-audit@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-audit

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

* Re: [PATCH] Audit: Fix the format type for size_t variables
  2008-02-27 16:22 ` Eric Paris
@ 2008-02-27 17:45   ` Paul Moore
  2008-02-27 17:58     ` Paul Moore
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Moore @ 2008-02-27 17:45 UTC (permalink / raw)
  To: Eric Paris; +Cc: linux-audit

On Wednesday 27 February 2008 11:22:01 am Eric Paris wrote:
> On Wed, 2008-02-27 at 10:39 -0500, Paul Moore wrote:
> > Fix the following compiler warning by using "%zu" as defined in
> > C99.
> >
> >   CC      kernel/auditsc.o
> >   kernel/auditsc.c: In function 'audit_log_single_execve_arg':
> >   kernel/auditsc.c:1074: warning: format '%ld' expects type 'long
> > int', but argument 4 has type 'size_t'
> >
> > Signed-off-by: Paul Moore <paul.moore@hp.com>
>
> I would have sworn I already saw this patch go by.  But I don't see
> it in Al's git tree.

Perhaps, but it's still in Linus' tree from a few hours ago.

> Acked-by: Eric Paris <eparis@redhat.com>
>
> > ---
> >
> >  kernel/auditsc.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/kernel/auditsc.c b/kernel/auditsc.c
> > index 2087d6d..782262e 100644
> > --- a/kernel/auditsc.c
> > +++ b/kernel/auditsc.c
> > @@ -1070,7 +1070,7 @@ static int audit_log_single_execve_arg(struct
> > audit_context *context, * so we can be sure nothing was lost.
> >  		 */
> >  		if ((i == 0) && (too_long))
> > -			audit_log_format(*ab, "a%d_len=%ld ", arg_num,
> > +			audit_log_format(*ab, "a%d_len=%zu ", arg_num,
> >  					 has_cntl ? 2*len : len);
> >
> >  		/*
> >
> > --
> > Linux-audit mailing list
> > Linux-audit@redhat.com
> > https://www.redhat.com/mailman/listinfo/linux-audit



-- 
paul moore
linux security @ hp

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

* Re: [PATCH] Audit: Fix the format type for size_t variables
  2008-02-27 17:45   ` Paul Moore
@ 2008-02-27 17:58     ` Paul Moore
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Moore @ 2008-02-27 17:58 UTC (permalink / raw)
  To: linux-audit

On Wednesday 27 February 2008 12:45:05 pm Paul Moore wrote:
> On Wednesday 27 February 2008 11:22:01 am Eric Paris wrote:
> > On Wed, 2008-02-27 at 10:39 -0500, Paul Moore wrote:
> > > Fix the following compiler warning by using "%zu" as defined in
> > > C99.
> > >
> > >   CC      kernel/auditsc.o
> > >   kernel/auditsc.c: In function 'audit_log_single_execve_arg':
> > >   kernel/auditsc.c:1074: warning: format '%ld' expects type 'long
> > > int', but argument 4 has type 'size_t'
> > >
> > > Signed-off-by: Paul Moore <paul.moore@hp.com>
> >
> > I would have sworn I already saw this patch go by.  But I don't see
> > it in Al's git tree.
>
> Perhaps, but it's still in Linus' tree from a few hours ago.

What I meant to say was ... it's still NOT in Linus' tree from a few 
hours ago.

> > Acked-by: Eric Paris <eparis@redhat.com>
> >
> > > ---
> > >
> > >  kernel/auditsc.c |    2 +-
> > >  1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/kernel/auditsc.c b/kernel/auditsc.c
> > > index 2087d6d..782262e 100644
> > > --- a/kernel/auditsc.c
> > > +++ b/kernel/auditsc.c
> > > @@ -1070,7 +1070,7 @@ static int
> > > audit_log_single_execve_arg(struct audit_context *context, * so
> > > we can be sure nothing was lost. */
> > >  		if ((i == 0) && (too_long))
> > > -			audit_log_format(*ab, "a%d_len=%ld ", arg_num,
> > > +			audit_log_format(*ab, "a%d_len=%zu ", arg_num,
> > >  					 has_cntl ? 2*len : len);
> > >
> > >  		/*
> > >
> > > --
> > > Linux-audit mailing list
> > > Linux-audit@redhat.com
> > > https://www.redhat.com/mailman/listinfo/linux-audit



-- 
paul moore
linux security @ hp

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

end of thread, other threads:[~2008-02-27 17:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-27 15:39 [PATCH] Audit: Fix the format type for size_t variables Paul Moore
2008-02-27 16:22 ` Eric Paris
2008-02-27 17:45   ` Paul Moore
2008-02-27 17:58     ` Paul Moore

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