]> sourceware.org Git - newlib-cygwin.git/commitdiff
libc/string/strsignal.c: Use of || not && lead to dead code.
authorJoel Sherrill <joel@rtems.org>
Wed, 15 Mar 2017 17:04:22 +0000 (12:04 -0500)
committerJoel Sherrill <joel@rtems.org>
Wed, 15 Mar 2017 17:04:34 +0000 (12:04 -0500)
Coverity Id: 175333

newlib/libc/string/strsignal.c

index 94ae26db1c852c29a7c5d79ee1ed720884a4c8ce..e32c9a7be24386e41ce62446a69c030df4399a9a 100644 (file)
@@ -37,7 +37,7 @@ QUICKREF
 /*
  *  Written by Joel Sherrill <joel.sherrill@OARcorp.com>.
  *
- *  COPYRIGHT (c) 2010.
+ *  COPYRIGHT (c) 2010, 2017.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  Permission to use, copy, modify, and distribute this software for any
@@ -49,8 +49,6 @@ QUICKREF
  *  WARRANTY.  IN PARTICULAR,  THE AUTHOR MAKES NO REPRESENTATION
  *  OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS
  *  SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
- *
- *  $Id$
  */
 
 #include <string.h>
@@ -72,7 +70,7 @@ _DEFUN (strsignal, (signal),
   buffer = _REENT_SIGNAL_BUF(ptr);
 
 #if defined(SIGRTMIN) && defined(SIGRTMAX)
-  if ((signal >= SIGRTMIN) || (signal <= SIGRTMAX)) {
+  if ((signal >= SIGRTMIN) && (signal <= SIGRTMAX)) {
     siprintf (buffer, "Real-time signal %d", signal - SIGRTMIN);
     return buffer;
   }
This page took 0.034012 seconds and 5 git commands to generate.