Author: emaste Date: Mon Nov 19 22:56:51 2012 New Revision: 243314 URL: http://svnweb.freebsd.org/changeset/base/243314
Log: Zero the whole struct not just the size of a pointer. Found by: clang Modified: head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Modified: head/tools/regression/sockets/unix_cmsg/unix_cmsg.c ============================================================================== --- head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Mon Nov 19 22:53:57 2012 (r243313) +++ head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Mon Nov 19 22:56:51 2012 (r243314) @@ -449,7 +449,7 @@ create_socket(char *sock_path, size_t so 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", _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"