#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
_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to