• Marek Vasut's avatar
    mkimage: Fix warning from fix for generating multi and script images again · 34633141
    Marek Vasut authored
    Seems 6ae6e160 broke creating images in certain cases, there
    are two problems with that patch.
    
    First is that the expression "!x == 4 || !x == 6" is ambiguous.  The
    intention here was "!(x == 4) || !(x == 6)" based on reading further in
    the file, where this was borrowed from.  This however is interpreted by
    gcc as "(!x) == 4 || (!x) == 6" and always false.  gcc-5.x will warn
    about this case.
    
    The second problem is that we do not want to test for the case of "(NOT x
    is 4) OR (NOT x is 6)" but instead "(x is not equal to 4) AND (x is not
    equal to 6)".  This is because in those two cases we already execute the
    code question in another part of the file.  Rewrite the expression and
    add parenthesis for clarity.
    Signed-off-by: 's avatarMarek Vasut <marex@denx.de>
    Cc: Tom Rini <trini@konsulko.com>
    Cc: Philippe De Swert <philippedeswert@gmail.com>
    Cc: Simon Glass <sjg@chromium.org>
    [trini: Re-word Marek's explanation]
    34633141
Name
Last commit
Last update
..
buildman Loading commit data...
easylogo Loading commit data...
env Loading commit data...
gdb Loading commit data...
kermit Loading commit data...
logos Loading commit data...
omap Loading commit data...
palmtreo680 Loading commit data...
patman Loading commit data...
scripts Loading commit data...
.gitignore Loading commit data...
Makefile Loading commit data...
aisimage.c Loading commit data...
aisimage.h Loading commit data...
atmel_pmecc_params.c Loading commit data...
atmelimage.c Loading commit data...
bin2header.c Loading commit data...
bmp_logo.c Loading commit data...
default_image.c Loading commit data...
dumpimage.c Loading commit data...
dumpimage.h Loading commit data...
envcrc.c Loading commit data...
fdt_host.h Loading commit data...
fdtgrep.c Loading commit data...
fit_check_sign.c Loading commit data...
fit_common.c Loading commit data...
fit_common.h Loading commit data...
fit_image.c Loading commit data...
fit_info.c Loading commit data...
gen_eth_addr.c Loading commit data...
genboardscfg.py Loading commit data...
getline.c Loading commit data...
getline.h Loading commit data...
gpheader.h Loading commit data...
gpimage-common.c Loading commit data...
gpimage.c Loading commit data...
ifdtool.c Loading commit data...
ifdtool.h Loading commit data...
image-host.c Loading commit data...
imagetool.c Loading commit data...
imagetool.h Loading commit data...
img2brec.sh Loading commit data...
img2srec.c Loading commit data...
imximage.c Loading commit data...
imximage.h Loading commit data...
jtagconsole Loading commit data...
kwbimage.c Loading commit data...
kwbimage.h Loading commit data...
kwboot.c Loading commit data...
lpc32xximage.c Loading commit data...
microcode-tool Loading commit data...
microcode-tool.py Loading commit data...
mingw_support.c Loading commit data...
mingw_support.h Loading commit data...
mkenvimage.c Loading commit data...
mkexynosspl.c Loading commit data...
mkimage.c Loading commit data...
mkimage.h Loading commit data...
mksunxiboot.c Loading commit data...
moveconfig.py Loading commit data...
mxsboot.c Loading commit data...
mxsimage.c Loading commit data...
mxsimage.h Loading commit data...
ncb.c Loading commit data...
netconsole Loading commit data...
omapimage.c Loading commit data...
omapimage.h Loading commit data...
os_support.c Loading commit data...
os_support.h Loading commit data...
pbl_crc32.c Loading commit data...
pbl_crc32.h Loading commit data...
pblimage.c Loading commit data...
pblimage.h Loading commit data...
proftool.c Loading commit data...
relocate-rela.c Loading commit data...
rkcommon.c Loading commit data...
rkcommon.h Loading commit data...
rkimage.c Loading commit data...
rksd.c Loading commit data...
rkspi.c Loading commit data...
socfpgaimage.c Loading commit data...
ublimage.c Loading commit data...
ublimage.h Loading commit data...
ubsha1.c Loading commit data...
xway-swap-bytes.c Loading commit data...
zynqimage.c Loading commit data...