diff options
author | Ulrich Spörlein <uqs@FreeBSD.org> | 2015-12-29 11:24:35 +0000 |
---|---|---|
committer | Ulrich Spörlein <uqs@FreeBSD.org> | 2015-12-29 11:24:35 +0000 |
commit | e96092e82bbfbee2350ed4061ae1db9b95ef7156 (patch) | |
tree | f9218ab7a14e2a493fba0f91eb498c3952cb9ce3 /sbin | |
parent | fcf8d36c464c6686949e02b48d41b976e311c9f3 (diff) | |
download | src-e96092e82bbfbee2350ed4061ae1db9b95ef7156.tar.gz src-e96092e82bbfbee2350ed4061ae1db9b95ef7156.zip |
Fix type mismatches for malloc(3) and Co.
Found by: clang static analyzer
Reviewed by: ed
Differential Revision: https://reviews.freebsd.org/D4722
Notes
Notes:
svn path=/head/; revision=292863
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/mount/mount.c | 2 | ||||
-rw-r--r-- | sbin/umount/umount.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 8c68467465c1..debe3547a8ff 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -541,7 +541,7 @@ append_arg(struct cpa *sa, char *arg) { if (sa->c + 1 == sa->sz) { sa->sz = sa->sz == 0 ? 8 : sa->sz * 2; - sa->a = realloc(sa->a, sizeof(sa->a) * sa->sz); + sa->a = realloc(sa->a, sizeof(*sa->a) * sa->sz); if (sa->a == NULL) errx(1, "realloc failed"); } diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index 521bbc890b64..6cd8ea76349c 100644 --- a/sbin/umount/umount.c +++ b/sbin/umount/umount.c @@ -434,7 +434,7 @@ getmntentry(const char *fromname, const char *onname, fsid_t *fsid, dowhat what) { static struct statfs *mntbuf; static size_t mntsize = 0; - static char *mntcheck = NULL; + static int *mntcheck = NULL; struct statfs *sfs, *foundsfs; int i, count; |