Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1501963 > unrolled thread
| Started by | Johannes Thumshirn <morbidrsa@gmail.com> |
|---|---|
| First post | 2016-10-17 15:20 +0200 |
| Last post | 2016-10-17 15:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: drivers/mcb/mcb-parse.c:152: bad if expression Johannes Thumshirn <morbidrsa@gmail.com> - 2016-10-17 15:20 +0200
| From | Johannes Thumshirn <morbidrsa@gmail.com> |
|---|---|
| Date | 2016-10-17 15:20 +0200 |
| Subject | Re: drivers/mcb/mcb-parse.c:152: bad if expression |
| Message-ID | <stfZD-3Xh-29@gated-at.bofh.it> |
On Mon, Oct 17, 2016 at 1:17 PM, David Binderman <dcb314@hotmail.com> wrote:
> Hello there,
>
> drivers/mcb/mcb-parse.c:152:22: warning: logical ‘and’ of mutually exclusive tests is always false [-Wlogical-op]
>
> Source code is
>
> if (bar_count <= 0 && bar_count > CHAMELEON_BAR_MAX)
>
> Maybe better code
>
> if (bar_count <= 0 || bar_count > CHAMELEON_BAR_MAX)
>
> Regards
>
> David Binderman
Hi David,
Looks reasonable, care to send a patch?
Thanks,
Johannes
Back to top | Article view | linux.kernel
csiph-web