[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45562: [PATCH] Fix "comparison always the same" warnings found by lg
From: |
Lars Ingebrigtsen |
Subject: |
bug#45562: [PATCH] Fix "comparison always the same" warnings found by lgtm |
Date: |
Wed, 21 Jul 2021 13:30:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Andreas Schwab <schwab@linux-m68k.org> 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#45562: [PATCH] Fix "comparison always the same" warnings found by lgtm,
Lars Ingebrigtsen <=