From: Junio C Hamano Date: Wed, 09 Sep 2020 20:06:09 GMT Subject: Re: [PATCH] blame.c: replace instance of !oidcmp for oideq Message-ID: In-Reply-To: <20200909191746.GA2514794@coredump.intra.peff.net> Jeff King writes: > @@ > -struct object_id *OIDPTR1; > -struct object_id *OIDPTR2; > +expression OIDPTR1; > +expression OIDPTR2; > @@ > - oidcmp(OIDPTR1, OIDPTR2) == 0 > + oideq(OIDPTR1, OIDPTR2) > @@ -71,8 +71,8 @@ expression E1, E2; > ...>} > > @@ > -struct object_id *OIDPTR1; > -struct object_id *OIDPTR2; > +expression *OIDPTR1; > +expression *OIDPTR2; > @@ > - oidcmp(OIDPTR1, OIDPTR2) != 0 > + !oideq(OIDPTR1, OIDPTR2) With an extra insight from the counter-example Réne pointed out in your message, I think the above two are safe but all the others are unsafe.