netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Haller <thaller@redhat.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft v2 0/4] [RESENT] remove xfree() and add free_const()+nft_gmp_free()
Date: Thu, 09 Nov 2023 18:14:56 +0100	[thread overview]
Message-ID: <76fee659f586988888d1805c5a69627dda5c4f03.camel@redhat.com> (raw)
In-Reply-To: <ZU0DY9x7h5q1och2@calendula>

On Thu, 2023-11-09 at 17:05 +0100, Pablo Neira Ayuso wrote:
> On Tue, Oct 24, 2023 at 11:57:06AM +0200, Thomas Haller wrote:
> > RESENT of v1.
> > 
> > Also rebased on top of current `master`, which required minor
> > adjustments.
> > 
> > Also minor adjustments to the commit messages.
> 
> Applied.

Thanks.

> 
> To be honest, reading the longish commit descriptions several times,
> I
> doubt there is any benefit in this, 

I claim, there was no benefit in xfree(). that's why it was dropped in
favor of standard free(). The special function xfree() needs a
justification, not the other way around.


> I might end up myself using
> free_const() everywhere not to figure out if it is const or not,
> because I don't really care.

That seems not a good practice. Const-correctness may help you to catch
bugs via unwanted modifications. If constness is unnecessarily cast
away, it's looses such hints from the compiler.


Thomas


  reply	other threads:[~2023-11-09 17:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24  9:57 [PATCH nft v2 0/4] [RESENT] remove xfree() and add free_const()+nft_gmp_free() Thomas Haller
2023-10-24  9:57 ` [PATCH nft v2 1/4] datatype: don't return a const string from cgroupv2_get_path() Thomas Haller
2023-10-24  9:57 ` [PATCH nft v2 2/4] gmputil: add nft_gmp_free() to free strings from mpz_get_str() Thomas Haller
2023-10-24  9:57 ` [PATCH nft v2 3/4] all: add free_const() and use it instead of xfree() Thomas Haller
2023-10-24  9:57 ` [PATCH nft v2 4/4] all: remove xfree() and use plain free() Thomas Haller
2023-11-06 13:35 ` [PATCH nft v2 0/4] [RESENT] remove xfree() and add free_const()+nft_gmp_free() Pablo Neira Ayuso
2023-11-09 16:05 ` Pablo Neira Ayuso
2023-11-09 17:14   ` Thomas Haller [this message]
2023-11-09 19:15     ` Pablo Neira Ayuso
2023-11-09 20:02       ` Thomas Haller

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=76fee659f586988888d1805c5a69627dda5c4f03.camel@redhat.com \
    --to=thaller@redhat.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).