Linux Netfilter development
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Sutter <phil@nwl.cc>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [conntrack-tools PATCH] src: Eliminate warnings with -Wcalloc-transposed-args
Date: Wed, 6 Nov 2024 00:10:02 +0100	[thread overview]
Message-ID: <Zyqlyj0FKU7XeUD5@calendula> (raw)
In-Reply-To: <20241105215450.6122-1-phil@nwl.cc>

On Tue, Nov 05, 2024 at 10:54:50PM +0100, Phil Sutter wrote:
> calloc() expects the number of elements in the first parameter, not the
> second. Swap them and while at it drop one pointless cast (the function
> returns a void pointer anyway).

BTW, will you add

-Wcalloc-transposed-args

to Makefile.am?

Thanks

  parent reply	other threads:[~2024-11-05 23:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05 21:54 [conntrack-tools PATCH] src: Eliminate warnings with -Wcalloc-transposed-args Phil Sutter
2024-11-05 22:01 ` Florian Westphal
2024-11-05 22:55 ` Phil Sutter
2024-11-05 23:10 ` Pablo Neira Ayuso [this message]
2024-11-05 23:17   ` Phil Sutter
2024-11-05 23:21     ` Pablo Neira Ayuso

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=Zyqlyj0FKU7XeUD5@calendula \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=phil@nwl.cc \
    /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