9
0
Fork 0

commands: ubiupdatevol: store return value of read() in a signed int

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

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Ulrich Ölmann 2016-09-05 21:36:17 +02:00 committed by Sascha Hauer
parent f7a2e37fcd
commit 90494c6f7e
1 changed files with 1 additions and 2 deletions

View File

@ -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)