bug-a2ps
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

a2ps-4.14 bug report for bad if statement


From: David Binderman
Subject: a2ps-4.14 bug report for bad if statement
Date: Wed, 6 Feb 2013 09:03:11 +0000


Hello there,

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 || signal < 
32.

The source code is

  if (signal > 0 || signal < NSIG)

More plausible code might be

  if (signal > 0 && signal < NSIG)

Regards

David Binderman

                                          


reply via email to

[Prev in Thread] Current Thread [Next in Thread]