runloop.c: 2 * bad if tests
David Binderman <[email protected]>
| Newsgroups | gmane.comp.printing.cups.bugs |
|---|---|
| Message-ID | <[email protected]> |
I just tried a compile of cups-1.6.1 with
extra compiler flag -Wlogical-op.
The compiler said
runloop.c: In function 'backendDrainOutput':
runloop.c:93:7: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]
if (errno != EAGAIN || errno != EINTR)
^
runloop.c: In function 'backendRunLoop':
runloop.c:321:2: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]
if (errno != EAGAIN || errno != EINTR)
^
Suggest swap || for &&