[U-Boot] [PATCH 04/13] common/cmd_pxe.c: Fix compile warning

Wolfgang Denk wd at denx.de
Fri Dec 9 21:45:44 CET 2011


Dear Jason,

In message <20111209134819.GA26840 at jhobbs-laptop> you wrote:
> 
> >  	default:
> >  		printf("Ignoring malformed menu command: %.*s\n",
> >  				(int)(*c - s), s);
> > +		err = -1;
> 
> err should either be set to 0 here, or initialized to 0 at the top of
> the function. Setting it to -1 will cause the parser to give up rather
> than just printing out the warning message. It doesn't have to give up,
> and not giving up makes the parser more accommodating of pxelinux
> commands that aren't supported in U-Boot.

You have way more experience with PXE than me, but if we runinto this
case, doesn't that mean that the whole menu setup is severely broken,
and continuing is more or less invoking random behaviour?

If you really want to see a 0 here, then please feel free to submit an
updated / fixed patch.

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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
I really hate this damned machine     It never does quite what I want
I wish that they would sell it.              But only what I tell it.


More information about the U-Boot mailing list