diff options
author | Ulrich Spörlein <uqs@FreeBSD.org> | 2015-12-29 11:24:41 +0000 |
---|---|---|
committer | Ulrich Spörlein <uqs@FreeBSD.org> | 2015-12-29 11:24:41 +0000 |
commit | c9e1c304c1f5553fb45f2851840cb6ee6e39243f (patch) | |
tree | b886de70650826ff015bc0343d808ffba0f524fd /usr.sbin/rpc.lockd | |
parent | e96092e82bbfbee2350ed4061ae1db9b95ef7156 (diff) | |
download | src-test2-c9e1c304c1f5553fb45f2851840cb6ee6e39243f.tar.gz src-test2-c9e1c304c1f5553fb45f2851840cb6ee6e39243f.zip |
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
Notes
Notes:
svn path=/head/; revision=292864
Diffstat (limited to 'usr.sbin/rpc.lockd')
-rw-r--r-- | usr.sbin/rpc.lockd/lockd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c index 4f1347ef924b..88b19b71e2bb 100644 --- a/usr.sbin/rpc.lockd/lockd.c +++ b/usr.sbin/rpc.lockd/lockd.c @@ -220,7 +220,7 @@ main(int argc, char **argv) * list. */ if (nhosts == 0) { - hosts = malloc(sizeof(char**)); + hosts = malloc(sizeof(char *)); if (hosts == NULL) out_of_mem(); |