summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mpsutil
diff options
context:
space:
mode:
authoruqs <uqs@FreeBSD.org>2015-12-29 11:24:41 +0000
committeruqs <uqs@FreeBSD.org>2015-12-29 11:24:41 +0000
commit11e0dd6c90098a31b4ee84a2af39114001952d67 (patch)
treeb886de70650826ff015bc0343d808ffba0f524fd /usr.sbin/mpsutil
parentd4f2c120c09150a7012ceea91a74ea068aa5a9c6 (diff)
downloadFreeBSD-src-11e0dd6c90098a31b4ee84a2af39114001952d67.zip
FreeBSD-src-11e0dd6c90098a31b4ee84a2af39114001952d67.tar.gz
Fix type mismatches for malloc(3) and Co.
This is rather pedantic, as for most architectures it holds that sizeof(type *) == sizeof(type **) Found by: clang static analyzer Reviewed by: ed Differential Revision: https://reviews.freebsd.org/D4722
Diffstat (limited to 'usr.sbin/mpsutil')
-rw-r--r--usr.sbin/mpsutil/mps_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/mpsutil/mps_cmd.c b/usr.sbin/mpsutil/mps_cmd.c
index 876243f..24ed74e 100644
--- a/usr.sbin/mpsutil/mps_cmd.c
+++ b/usr.sbin/mpsutil/mps_cmd.c
@@ -486,7 +486,7 @@ mps_firmware_get(int fd, unsigned char **firmware, bool bios)
}
size = reply.ActualImageSize;
- *firmware = calloc(1, sizeof(char) * size);
+ *firmware = calloc(1, sizeof(unsigned char) * size);
if (*firmware == NULL) {
warn("calloc");
return (-1);
OpenPOWER on IntegriCloud