a2ps-4.14 bug report for bad if statement

David Binderman <[email protected]> Wed, 6 Feb 2013 09:03:11 +0000
Newsgroups gmane.comp.printing.a2ps.bugs
Message-ID <[email protected]>

Hello there=2C

I recently tried out the cppcheck static analysis tool on the source
code of a2ps-4.14

It said

[a2ps-4.14/lib/signame.c:306]:
 (warning) Logical disjunction always evaluates to true: signal > 0 || sign=
al < 32.

The source code is

=A0 if (signal > 0 || signal < NSIG)

More plausible code might be

=A0 if (signal > 0 && signal < NSIG)

Regards

David Binderman

 		 	   		  =