[RTEMS Project] #2393: rtems/c/src/lib/libbsp/sparc/shared/1553/b1553brm.c:992: bad if test ?

RTEMS trac trac at rtems.org
Wed Aug 19 15:07:05 UTC 2015


#2393: rtems/c/src/lib/libbsp/sparc/shared/1553/b1553brm.c:992: bad if test ?
---------------------+--------------------
 Reporter:  dcb      |      Owner:
     Type:  defect   |     Status:  new
 Priority:  normal   |  Milestone:  4.11.1
Component:  General  |    Version:  4.10
 Severity:  normal   |   Keywords:
---------------------+--------------------
 [rtems/c/src/lib/libbsp/sparc/shared/1553/b1553brm.c:992]: (style)
 Unsigned variable 'count' can't be negative so it is unnecessary to test
 it.

 Source code is

     if (count >= 0) {
         return RTEMS_SUCCESSFUL;
     }
     return RTEMS_UNSATISFIED;

 Which means that the second return is dead code. Suggest code rework.

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


More information about the bugs mailing list