[U-Boot] [PATCH] mkimage: Fix generating multi and script images again

Wolfgang Denk wd at denx.de
Mon Dec 7 18:47:36 CET 2015


Dear Marek,

In message <1449507714-9599-1-git-send-email-marex at denx.de> you wrote:
> 
> Second is the coding which causes gcc 4.9.x and newer scream gruesome
> death and murder. The expression !x == 0 && !x == 1 is ambiguous and
> should instead be rewritten into (x != 0) && (x != 1) to be correct.

But (!x == 0) && (!x == 1) ist not the same as (x != 0) && (x != 1);
assume x=2:

	(!2 == 0) && (!2 == 1) => (0 == 0) && (0 == 1) => 1 && 0 => 0

	(2 != 0) && (2 != 1) => 1 && 1 => 1

???

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A weak mind is like a microscope, which magnifies trifling things,
but cannot receive great ones.      -- Philip Earl of Chesterfield


More information about the U-Boot mailing list