From 90494c6f7e6036c1bfb614aeca81dbe2d362fd5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20=C3=96lmann?= Date: Mon, 5 Sep 2016 21:36:17 +0200 Subject: [PATCH] commands: ubiupdatevol: store return value of read() in a signed int MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With an unsigned int test for errors from read() can never become true. Signed-off-by: Ulrich Ölmann Signed-off-by: Sascha Hauer --- commands/ubi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/commands/ubi.c b/commands/ubi.c index 65d2d256a..dd981f95e 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)