#2880 closed defect (wontfix)

src/cpukit/libfs/src/jffs2/src/readinode.c:189: faulty logic

Reported by: David Binderman Owned by:
Priority: normal Milestone: 5.1
Component: unspecified Version: 4.11
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

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;

Change History (5)

comment:1 Changed on Jan 24, 2017 at 6:32:03 AM by Sebastian Huber

Resolution: wontfix
Status: newclosed

This code block is identical to the Linux upstream.

comment:2 Changed on Jan 24, 2017 at 8:18:51 AM by David Binderman

I've reported this strange code to the linux developers.

comment:3 Changed on Jan 24, 2017 at 8:20:57 AM by Sebastian Huber

The JFFS2 code should be updated to a specific Linux version in one rush.

comment:4 Changed on May 11, 2017 at 7:31:02 AM by Sebastian Huber

Milestone: 4.124.12.0

comment:5 Changed on Nov 9, 2017 at 6:27:14 AM by Sebastian Huber

Milestone: 4.12.05.1

Milestone renamed

Note: See TracTickets for help on using tickets.