Subject: bug#45562: [PATCH] Fix "comparison always the same" warnings found by lgtm

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 21 Jul 2021 13:30:10 +0200

Andreas Schwab <[email-masked]> writes:

>>>> --- a/src/fns.c
>>>> +++ b/src/fns.c
>>>> @@ -3847,8 +3847,6 @@ base64_decode_1 (const char *from, char *to, ptrdiff_t length,
>>>>        if (c == '=')
>>>>  	continue;
>>>>
>>>> -      if (v1 < 0)
>>>> -	return -1;
>
> Looking at commit 5abaea334cf, that likely needs to test v1 == 0 instead.

Seems like so to me, too.  So I've now made that change on the trunk --
so the lgtm checks found a real bug there.

As for the others, skimming this thread there didn't seem to be any
consensus that the proposed changes makes the code any better (or
clearer), so applying those doesn't seem to be a net win, and I'm
closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no