Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#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 01/24/17 at 06:32:03 by Sebastian Huber

Resolution: wontfix
Status: newclosed

This code block is identical to the Linux upstream.

comment:2 Changed on 01/24/17 at 08:18:51 by David Binderman

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

comment:3 Changed on 01/24/17 at 08:20:57 by Sebastian Huber

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

comment:4 Changed on 05/11/17 at 07:31:02 by Sebastian Huber

Milestone: 4.124.12.0

comment:5 Changed on 11/09/17 at 06:27:14 by Sebastian Huber

Milestone: 4.12.05.1

Milestone renamed

Note: See TracTickets for help on using tickets.