diff options
author | Ed Maste <emaste@FreeBSD.org> | 2012-11-19 22:56:51 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2012-11-19 22:56:51 +0000 |
commit | 8f37d24bedf8bfa33e72975b83bfea95fab9752f (patch) | |
tree | 2636936d487923fd97928f1caef3dcb693e15171 /tools/regression/sockets/unix_cmsg | |
parent | d701ebcb13f8980dccd77d68dc78f0b076d7af40 (diff) |
Zero the whole struct not just the size of a pointer.
Found by: clang
Notes
Notes:
svn path=/head/; revision=243314
Diffstat (limited to 'tools/regression/sockets/unix_cmsg')
-rw-r--r-- | tools/regression/sockets/unix_cmsg/unix_cmsg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/regression/sockets/unix_cmsg/unix_cmsg.c b/tools/regression/sockets/unix_cmsg/unix_cmsg.c index c16b468ceb70..06728d75a8fd 100644 --- a/tools/regression/sockets/unix_cmsg/unix_cmsg.c +++ b/tools/regression/sockets/unix_cmsg/unix_cmsg.c @@ -449,7 +449,7 @@ create_socket(char *sock_path, size_t sock_path_len, struct sockaddr_un *addr) goto failed; } - memset(addr, 0, sizeof(addr)); + memset(addr, 0, sizeof(*addr)); addr->sun_family = AF_LOCAL; if (strlen(sock_path) >= sizeof(addr->sun_path)) { logmsgx("create_socket: too long path name (>= %lu) for local domain socket", |