netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] extensions: libxt_hashlimit: fix 64-bit printf format
@ 2017-05-18 11:43 Alin Nastac
  2017-05-18 13:37 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Alin Nastac @ 2017-05-18 11:43 UTC (permalink / raw)
  To: netfilter-devel

Furthermore, this extension use a mix of PRIu64 and %llu formats for
uint64_t values. IMO it should use only one, for the sake of consistency.

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
---
 extensions/libxt_hashlimit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extensions/libxt_hashlimit.c b/extensions/libxt_hashlimit.c
index 9e63e1e..21b7aaa 100644
--- a/extensions/libxt_hashlimit.c
+++ b/extensions/libxt_hashlimit.c
@@ -942,7 +942,7 @@ static void print_packets_rate_xlate(struct xt_xlate *xl, uint64_t avg,
 		    _rates[i].mult / avg < _rates[i].mult % avg)
 			break;
 
-	xt_xlate_add(xl, " %llu/%s burst %lu packets",
+	xt_xlate_add(xl, " %llu/%s burst "PRIu64" packets",
 		     _rates[i-1].mult / avg, _rates[i-1].name, burst);
 }
 
-- 
2.7.4


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

* Re: [PATCH] extensions: libxt_hashlimit: fix 64-bit printf format
  2017-05-18 11:43 [PATCH] extensions: libxt_hashlimit: fix 64-bit printf format Alin Nastac
@ 2017-05-18 13:37 ` Pablo Neira Ayuso
  2017-05-18 14:05   ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2017-05-18 13:37 UTC (permalink / raw)
  To: Alin Nastac; +Cc: netfilter-devel

On Thu, May 18, 2017 at 01:43:28PM +0200, Alin Nastac wrote:
> Furthermore, this extension use a mix of PRIu64 and %llu formats for
> uint64_t values. IMO it should use only one, for the sake of consistency.
> 
> Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
> ---
>  extensions/libxt_hashlimit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/extensions/libxt_hashlimit.c b/extensions/libxt_hashlimit.c
> index 9e63e1e..21b7aaa 100644
> --- a/extensions/libxt_hashlimit.c
> +++ b/extensions/libxt_hashlimit.c
> @@ -942,7 +942,7 @@ static void print_packets_rate_xlate(struct xt_xlate *xl, uint64_t avg,
>  		    _rates[i].mult / avg < _rates[i].mult % avg)
>  			break;
>  
> -	xt_xlate_add(xl, " %llu/%s burst %lu packets",
> +	xt_xlate_add(xl, " %llu/%s burst "PRIu64" packets",
                                         ^
                                       missing % here?

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

* Re: [PATCH] extensions: libxt_hashlimit: fix 64-bit printf format
  2017-05-18 13:37 ` Pablo Neira Ayuso
@ 2017-05-18 14:05   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2017-05-18 14:05 UTC (permalink / raw)
  To: Alin Nastac; +Cc: netfilter-devel

On Thu, May 18, 2017 at 03:37:30PM +0200, Pablo Neira Ayuso wrote:
> On Thu, May 18, 2017 at 01:43:28PM +0200, Alin Nastac wrote:
> > Furthermore, this extension use a mix of PRIu64 and %llu formats for
> > uint64_t values. IMO it should use only one, for the sake of consistency.
> > 
> > Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
> > ---
> >  extensions/libxt_hashlimit.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/extensions/libxt_hashlimit.c b/extensions/libxt_hashlimit.c
> > index 9e63e1e..21b7aaa 100644
> > --- a/extensions/libxt_hashlimit.c
> > +++ b/extensions/libxt_hashlimit.c
> > @@ -942,7 +942,7 @@ static void print_packets_rate_xlate(struct xt_xlate *xl, uint64_t avg,
> >  		    _rates[i].mult / avg < _rates[i].mult % avg)
> >  			break;
> >  
> > -	xt_xlate_add(xl, " %llu/%s burst %lu packets",
> > +	xt_xlate_add(xl, " %llu/%s burst "PRIu64" packets",
>                                          ^
>                                        missing % here?

OK, please revamp, thanks.

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

end of thread, other threads:[~2017-05-18 14:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18 11:43 [PATCH] extensions: libxt_hashlimit: fix 64-bit printf format Alin Nastac
2017-05-18 13:37 ` Pablo Neira Ayuso
2017-05-18 14:05   ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).