]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
tools: mkimage: fix sizeof_mismatch found by coverity
authorSven Ebenfeld <sven.ebenfeld@gmail.com>
Tue, 17 Jan 2017 18:36:51 +0000 (19:36 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 20 Jan 2017 20:38:04 +0000 (15:38 -0500)
Reported-by: Coverity (CID: 155214)
Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
tools/mkimage.c

index b0c98f6f5512be510e463538a24d35d36dfdcd91..d982bc5665f1749c393e689d58122f3c513108ce 100644 (file)
@@ -526,7 +526,7 @@ int main(int argc, char **argv)
                                                        + 0x20, 0 };
                        int i = params.file_size;
                        for (; i < aligned_filesize; i++) {
-                               if (write(ifd, &i, 1) != 1) {
+                               if (write(ifd, (char *) &i, 1) != 1) {
                                        fprintf(stderr,
                                                        "%s: Write error on %s: %s\n",
                                                        params.cmdname,