From: brian m. carlson Date: Wed, 13 May 2020 22:49:12 GMT Subject: Re: [PATCH 10/44] connect: add function to detect supported v1 hash functions Message-ID: <20200513224912.GE6605@camp.crustytoothpaste.net> In-Reply-To: On 2020-05-13 at 19:39:41, Martin Ă…gren wrote: > On Wed, 13 May 2020 at 02:56, brian m. carlson > wrote: > > + while (hash) { > > + if (!xstrncmpz(desired, hash, len)) > > + found = 1; > > + > > + if (found) > > + return 1; > > I first thought this structure was because this loop body would learn to > do something else later in the series. But this is it. This looks like > it could just be "if (!xstrncmpz(...)) return 1;" and drop "found". Yeah, I think it could. I originally didn't have the helper and the code was pretty hideous, so I probably forgot to simplify when I used the helper again. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204