fs/jffs2/readinode.c:189: faulty logic ?

David Binderman dcb314 at hotmail.com
Tue Jan 24 00:15:41 PST 2017


Hello there,

fs/jffs2/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;

Regards

David Binderman


More information about the linux-mtd mailing list