From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Duy Nguyen" <pclouds@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Git Mailing List" <git@vger.kernel.org>,
"Michał Górny" <mgorny@gentoo.org>,
"Eric Sunshine" <sunshine@sunshineco.com>
Subject: Re: [PATCH] refactor various if (x) FREE_AND_NULL(x) to just FREE_AND_NULL(x)
Date: Fri, 17 Aug 2018 13:44:05 -0400 [thread overview]
Message-ID: <20180817174404.GB9474@sigill.intra.peff.net> (raw)
In-Reply-To: <20180817173951.GA9474@sigill.intra.peff.net>
On Fri, Aug 17, 2018 at 01:39:51PM -0400, Jeff King wrote:
> > I wonder if there is a way to "relax" a pattern where these semantically
> > equivalent cases can all be covered automatically. I don't know enough
> > about the tool to say.
>
> Hmm. They seem to call these "standard isomorphisms":
>
> http://coccinelle.lip6.fr/standard.iso.html
>
> but I'm not sure of the correct way to use them (e.g., if we want to
> apply them for matching but not actually transform the code, though I am
> not actually opposed to transforming the code, too).
Hmph, I should really pause before hitting 'send'. Last message, I
promise. :)
I do not see an option to include a list an arbitrary set of
isomorphisms, but the standard.iso list should be used by default. I
wonder if you simply need to write your case in the normalized version
they use there (which I think is "X == NULL"), and the others would be
taken care of.
-Peff
next prev parent reply other threads:[~2018-08-17 17:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-17 9:17 [PATCH] gpg-interface.c: Fix potentially freeing NULL values Michał Górny
2018-08-17 9:28 ` Eric Sunshine
2018-08-17 9:40 ` Michał Górny
2018-08-17 13:02 ` [PATCH] refactor various if (x) FREE_AND_NULL(x) to just FREE_AND_NULL(x) Ævar Arnfjörð Bjarmason
2018-08-17 14:36 ` Duy Nguyen
2018-08-17 15:10 ` Duy Nguyen
2018-08-17 16:53 ` Junio C Hamano
2018-08-17 17:07 ` Junio C Hamano
2018-08-17 17:33 ` Jeff King
2018-08-17 17:39 ` Jeff King
2018-08-17 17:44 ` Jeff King [this message]
2018-08-17 18:29 ` Duy Nguyen
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=20180817174404.GB9474@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mgorny@gentoo.org \
--cc=pclouds@gmail.com \
--cc=sunshine@sunshineco.com \
/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).