Re: [PATCH 1/2] commands: ubiupdatevol: store return value of read() in a signed int

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ulrich,

please add to the commit log *why* you did this change. *What* you did
is already clear from the change itself.

Added this while applying:

With an unsigned int test for errors from read() can never become true.

Sascha


On Mon, Sep 05, 2016 at 09:36:17PM +0200, Ulrich Ölmann wrote:
> Signed-off-by: Ulrich Ölmann <u.oelmann@xxxxxxxxxxxxxx>
> ---
>  commands/ubi.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/commands/ubi.c b/commands/ubi.c
> index 65d2d256a830..dd981f95ea5d 100644
> --- a/commands/ubi.c
> +++ b/commands/ubi.c
> @@ -14,10 +14,9 @@
>  
>  static int do_ubiupdatevol(int argc, char *argv[])
>  {
> -	int fd_img, fd_vol, ret = 0;
> +	int count, fd_img, fd_vol, ret = 0;
>  	uint64_t size = 0;
>  	struct stat st;
> -	unsigned int count;
>  	void *buf;
>  
>  	if (argc - optind < 2)
> -- 
> 2.8.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux