Re: [PATCH 10/44] connect: add function to detect supported v1 hash functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-05-13 at 19:39:41, Martin Ågren wrote:
> On Wed, 13 May 2020 at 02:56, brian m. carlson
> <sandals@xxxxxxxxxxxxxxxxxxxx> 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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux