From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Sun, 8 Jan 2012 14:17:59 -0500 Subject: [U-Boot] [PATCHv3 4/8] mkenvimage: More error handling In-Reply-To: <1326032721-6150-1-git-send-email-david.wagner@free-electrons.com> References: <1325789099-9260-4-git-send-email-david.wagner@free-electrons.com> <1326032721-6150-1-git-send-email-david.wagner@free-electrons.com> Message-ID: <201201081417.59793.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: