Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/mkubootimage Avoid mixing signed/unsigned arguments ...
details: https://anonhg.NetBSD.org/src/rev/b91236be6b89
branches: trunk
changeset: 968048:b91236be6b89
user: martin <martin%NetBSD.org@localhost>
date: Wed Jan 01 11:48:36 2020 +0000
description:
Avoid mixing signed/unsigned arguments to the ? operator.
diffstat:
usr.bin/mkubootimage/mkubootimage.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 2b764f900689 -r b91236be6b89 usr.bin/mkubootimage/mkubootimage.c
--- a/usr.bin/mkubootimage/mkubootimage.c Wed Jan 01 11:46:43 2020 +0000
+++ b/usr.bin/mkubootimage/mkubootimage.c Wed Jan 01 11:48:36 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkubootimage.c,v 1.28 2020/01/01 10:35:10 skrll Exp $ */
+/* $NetBSD: mkubootimage.c,v 1.29 2020/01/01 11:48:36 martin Exp $ */
/*-
* Copyright (c) 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: mkubootimage.c,v 1.28 2020/01/01 10:35:10 skrll Exp $");
+__RCSID("$NetBSD: mkubootimage.c,v 1.29 2020/01/01 11:48:36 martin Exp $");
#include <sys/mman.h>
#include <sys/stat.h>
@@ -335,7 +335,7 @@
crc = crc32v(iov, 3);
} else {
dsize = update_image ?
- st.st_size - sizeof(*hdr) : st.st_size;
+ (uint32_t)st.st_size - sizeof(*hdr) : (uint32_t)st.st_size;
crc = crc32(p, st.st_size);
}
munmap(p, st.st_size);
@@ -389,7 +389,7 @@
#endif
const uint64_t dsize = update_image ?
- st.st_size - sizeof(*hdr) : st.st_size;
+ (uint64_t)st.st_size - sizeof(*hdr) : (uint64_t)st.st_size;
memset(hdr, 0, sizeof(*hdr));
hdr->code0 = htole32(ARM64_CODE0);
Home |
Main Index |
Thread Index |
Old Index