diff options
author | Jon Povey <jon.povey@racelogic.co.uk> | 2011-03-11 05:10:56 (GMT) |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-04-20 22:25:08 (GMT) |
commit | 735eb0f0e66b544b1dfaf6c43ce6e4bd9ae64b5e (patch) | |
tree | 5e79be38ff31b24fe389d45b082f651682dd9657 /include/cramfs | |
parent | aef293bc85dad4f8d645e46d723606a747236a60 (diff) | |
download | u-boot-fsl-qoriq-735eb0f0e66b544b1dfaf6c43ce6e4bd9ae64b5e.tar.xz |
tools/env: fix redundant env flag comparison
This fixes two bugs with comparison of redundant environment flags on
read.
flag0 and flag1 in fw_env_open() were declared signed instead of
unsigned char breaking BOOLEAN mode "== 0xFF" tests and in INCREMENTAL
mode the wrong environment would be chosen where the flag values are
127 and 128 (either way round). With both flags over 128, both signs
flipped and the logic worked by happy accident.
Also there was a logic bug in the INCREMENTAL test (after signedness was
fixed) in the case flag0=0, flag1=255, env 1 would be incorrectly chosen.
Fix both of these.
Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Diffstat (limited to 'include/cramfs')
0 files changed, 0 insertions, 0 deletions