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 &&
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.