netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Alin Nastac <alin.nastac@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v2] extensions: libxt_hashlimit: fix 64-bit printf formats
Date: Tue, 23 May 2017 23:11:48 +0200	[thread overview]
Message-ID: <20170523211148.GA8779@salvia> (raw)
In-Reply-To: <1495116985-27115-1-git-send-email-alin.nastac@gmail.com>

On Thu, May 18, 2017 at 04:16:25PM +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..970bad9 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, " %"PRIu64"/%s burst %"PRIu64" packets",
>  		     _rates[i-1].mult / avg, _rates[i-1].name, burst);

Are there more spots that can be converted in this
extensions/libxt_hashlimit.c file?

I see more %llu in spots for burst. If so, it would be great to fix
them all.

      reply	other threads:[~2017-05-23 21:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 14:16 [PATCH v2] extensions: libxt_hashlimit: fix 64-bit printf formats Alin Nastac
2017-05-23 21:11 ` Pablo Neira Ayuso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170523211148.GA8779@salvia \
    --to=pablo@netfilter.org \
    --cc=alin.nastac@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).