]> git.baikalelectronics.ru Git - kernel.git/commit
isdn: isdnloop: fix logic error in isdnloop_sendbuf
authorArnd Bergmann <arnd@arndb.de>
Wed, 6 Sep 2017 13:38:58 +0000 (15:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Sep 2017 03:03:54 +0000 (20:03 -0700)
commita2e2035a2f9cce3d2ce02d41703ccacd6c887377
tree3f93b7efd189c7842a26af83341d597dce44edac
parentf95d67f70d4b481a702681f2995218863d572d8c
isdn: isdnloop: fix logic error in isdnloop_sendbuf

gcc-7 found an ancient bug in the loop driver, leading to a condition that
is always false, meaning we ignore the contents of 'card->flags' here:

drivers/isdn/isdnloop/isdnloop.c:412:37: error: ?: using integer constants in boolean context, the expression will always evaluate to 'true' [-Werror=int-in-bool-context]

This changes the braces in the expression to ensure we actually
compare the flag bits, rather than comparing a constant. As Joe Perches
pointed out, an earlier patch of mine incorrectly assumed this was a
false-positive warning.

Cc: Joe Perches <joe@perches.com>
Link: https://patchwork.kernel.org/patch/9840289/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/isdnloop/isdnloop.c