UBI: eliminate possible undefined behaviour
authorPhil Carmody <ext-phil.2.carmody@nokia.com>
Thu, 23 Jul 2009 13:29:10 +0000 (15:29 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 26 Jul 2009 11:21:52 +0000 (14:21 +0300)
The assignment to pos when rb is finally NULL is undefined behaviour.
Upon seeing that assignment, GCC may assume that rb is not NULL, and
the loop condition ``rb'' may be optimised away.

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

No differences found