[U-Boot] [PATCH] tools: mkimage: fix sizeof_mismatch found by coverity

Reported-by: Coverity (CID: 155214) Signed-off-by: Sven Ebenfeld sven.ebenfeld@gmail.com --- tools/mkimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/mkimage.c b/tools/mkimage.c index f48135f..e9d049e 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -522,7 +522,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,

On Tue, Jan 17, 2017 at 07:36:51PM +0100, Sven Ebenfeld wrote:
Reported-by: Coverity (CID: 155214) Signed-off-by: Sven Ebenfeld sven.ebenfeld@gmail.com
Applied to u-boot/master, thanks!
participants (2)
-
Sven Ebenfeld
-
Tom Rini