[RTEMS Project] #4294: satcan.c: Unsigned compared against 0 error spotted by Coverity

RTEMS trac trac at rtems.org
Thu Mar 4 15:03:12 UTC 2021


#4294: satcan.c: Unsigned compared against 0 error spotted by Coverity
------------------------+--------------------
  Reporter:  Ryan Long  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  normal     |  Milestone:  6.1
 Component:  bsps       |    Version:  6
  Severity:  normal     |   Keywords:
Blocked By:             |   Blocking:
------------------------+--------------------
 CID 1399768: Unsigned compared against 0 in satcan_ioctl().

 {{{
 303                DBG("SatCAN: ioctl: masking register %d, with value
 %x\n\r",
 304                    regmod->reg, regmod->val);
    unsigned_compare: This less-than-zero comparison of an unsigned value
 is never true. regmod->reg < 0U.
 305                if (regmod->reg < 0)
 306                        return RTEMS_INVALID_NAME;
 307                else if (regmod->reg <= SATCAN_FILTER_STOP)
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/4294>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list