[RTEMS Project] #2880: src/cpukit/libfs/src/jffs2/src/readinode.c:189: faulty logic
RTEMS trac
trac at rtems.org
Mon Jan 23 17:46:08 UTC 2017
#2880: src/cpukit/libfs/src/jffs2/src/readinode.c:189: faulty logic
---------------------+------------------
Reporter: dcb | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 4.12
Component: General | Version: 4.11
Severity: normal | Keywords:
---------------------+------------------
src/cpukit/libfs/src/jffs2/src/readinode.c:189]: (style) Condition
'tn.fn.ofs>=offset' is always true
Source code is
if (tn->fn->ofs < offset)
next = tn->rb.rb_right;
else if (tn->fn->ofs >= offset)
next = tn->rb.rb_left;
else
break;
Maybe better code
if (tn->fn->ofs < offset)
next = tn->rb.rb_right;
else if (tn->fn->ofs > offset)
next = tn->rb.rb_left;
else
break;
--
Ticket URL: <http://devel.rtems.org/ticket/2880>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list