All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [libnftnl PATCH] utils: Introduce nftnl_parse_str_attr()
Date: Thu, 16 Oct 2025 16:03:32 +0200	[thread overview]
Message-ID: <aPD7NGL19sNV9uEf@orbyte.nwl.cc> (raw)
In-Reply-To: <aPD4mgdtY4DjLrEH@calendula>

Hi!

On Thu, Oct 16, 2025 at 03:52:26PM +0200, Pablo Neira Ayuso wrote:
> On Thu, Oct 16, 2025 at 01:01:42PM +0200, Florian Westphal wrote:
> > Phil Sutter <phil@nwl.cc> wrote:
> > > Wrap the common parsing of string attributes into a function. Apart from
> > > slightly reducing code size, this unifies callers in conditional freeing
> > > of the field in case it was set before (missing in twelve spots) and
> > > error checking for failing strdup()-calls (missing in four spots).
> > > Signed-off-by: Phil Sutter <phil@nwl.cc>
> > > ---
> > >  include/utils.h         |  3 +++
> > >  src/chain.c             | 33 +++++++++------------------------
> > >  src/expr/dynset.c       | 12 +++++-------
> > >  src/expr/flow_offload.c | 12 +++++-------
> > >  src/expr/log.c          | 13 ++++---------
> > >  src/expr/lookup.c       | 12 +++++-------
> > >  src/expr/objref.c       | 18 ++++++++----------
> > >  src/flowtable.c         | 24 ++++++++----------------
> > >  src/object.c            | 14 ++++++--------
> > >  src/rule.c              | 22 ++++++----------------
> > >  src/set.c               | 22 ++++++----------------
> > >  src/set_elem.c          | 38 +++++++++++++-------------------------
> > >  src/table.c             | 11 +++--------
> > >  src/trace.c             | 28 ++++++++++------------------
> > >  src/utils.c             | 15 +++++++++++++++
> > >  15 files changed, 106 insertions(+), 171 deletions(-)
> > 
> > Nice compaction.

Thanks. :)

> > Acked-by: Florian Westphal <fw@strlen.de>
> 
> I started different infrastructure to compact this, I can rebase at
> some point on top this if Phil is having time to make cleanups.

You're OK with me pushing this out? Feel free to send me your draft,
I'll review and maybe we can cross the beams^W^W^Wjoin forces.

Cheers, Phil

  reply	other threads:[~2025-10-16 14:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15 20:24 [libnftnl PATCH] utils: Introduce nftnl_parse_str_attr() Phil Sutter
2025-10-16 11:01 ` Florian Westphal
2025-10-16 13:52   ` Pablo Neira Ayuso
2025-10-16 14:03     ` Phil Sutter [this message]
2025-10-18 19:13 ` Phil Sutter

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=aPD7NGL19sNV9uEf@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=fw@strlen.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.