Hi Fabio,

> -----Original Message-----
> From: Fabio Estevam [mailto:feste...@gmail.com]
> Sent: 2018年11月1日 20:18
> To: Peng Fan <peng....@nxp.com>
> Cc: Stefano Babic <sba...@denx.de>; Fabio Estevam
> <fabio.este...@nxp.com>; U-Boot-Denx <u-boot@lists.denx.de>; dl-linux-imx
> <linux-...@nxp.com>
> Subject: Re: [U-Boot] [PATCH 1/4] tools: imx8image: check lseek return value
> 
> Hi Peng,
> 
> On Thu, Nov 1, 2018 at 9:15 AM Peng Fan <peng....@nxp.com> wrote:
> 
> > lseek only returns -1 when error. Is the coding style you proposed is
> > preferred than what this patch has?
> 
> In case lseek changes someday to return something else, checking for (ret < 0)
> will still work, so it is a more robust error handling.

lseek prototype, return value, in the spec 
http://pubs.opengroup.org/onlinepubs/9699919799/
Understand (ret < 0) is a good practice, but I do not think lseek return value 
will change.

Thanks,
Peng.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to