[U-Boot] [PATCHv3 4/8] mkenvimage: More error handling

Mike Frysinger vapier at gentoo.org
Sun Jan 8 20:17:59 CET 2012


On Sunday 08 January 2012 09:25:21 David Wagner wrote:
> --- a/tools/mkenvimage.c
> +++ b/tools/mkenvimage.c
> 
> +long int xstrtol(char *s)

const

> +{
> +	long int tmp;
> +
> +	tmp = strtol(s, NULL, 0);
> +	if (!errno)
> +		return tmp;

you should manually clear errno before calling strtol.  it'll set the value, 
but won't clear it.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120108/9be14991/attachment.pgp>


More information about the U-Boot mailing list