Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1501963 > unrolled thread

Re: drivers/mcb/mcb-parse.c:152: bad if expression

Started byJohannes Thumshirn <morbidrsa@gmail.com>
First post2016-10-17 15:20 +0200
Last post2016-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.


Contents

  Re: drivers/mcb/mcb-parse.c:152: bad if expression Johannes Thumshirn <morbidrsa@gmail.com> - 2016-10-17 15:20 +0200

#1501963 — Re: drivers/mcb/mcb-parse.c:152: bad if expression

FromJohannes Thumshirn <morbidrsa@gmail.com>
Date2016-10-17 15:20 +0200
SubjectRe: 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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web