diff options
author | ngie <ngie@FreeBSD.org> | 2015-04-11 03:19:48 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-04-11 03:19:48 +0000 |
commit | 4cd5f1d88e1d9580b0e7263cd8c3470067b43aa0 (patch) | |
tree | 286af40fd005be777a32f467f1fd313957d78bb9 /tools/regression | |
parent | 78724b4a62f8eaa1a1a17cc1e9e29bae42508188 (diff) | |
download | FreeBSD-src-4cd5f1d88e1d9580b0e7263cd8c3470067b43aa0.zip FreeBSD-src-4cd5f1d88e1d9580b0e7263cd8c3470067b43aa0.tar.gz |
Fix a -Wuninitialized warning by setting the socket to -1 and bump WARNS to 6
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'tools/regression')
-rw-r--r-- | tools/regression/sockets/shutdown/Makefile | 2 | ||||
-rw-r--r-- | tools/regression/sockets/shutdown/shutdown.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/tools/regression/sockets/shutdown/Makefile b/tools/regression/sockets/shutdown/Makefile index 07ba65d..63045f5 100644 --- a/tools/regression/sockets/shutdown/Makefile +++ b/tools/regression/sockets/shutdown/Makefile @@ -4,6 +4,6 @@ PROG= shutdown MAN= -WARNS?= 2 +WARNS?= 6 .include <bsd.prog.mk> diff --git a/tools/regression/sockets/shutdown/shutdown.c b/tools/regression/sockets/shutdown/shutdown.c index c4e884d..3d23c94 100644 --- a/tools/regression/sockets/shutdown/shutdown.c +++ b/tools/regression/sockets/shutdown/shutdown.c @@ -45,6 +45,8 @@ main(void) int listen_sock, connect_sock; u_short port; + listen_sock = -1; + /* Shutdown(2) on an invalid file descriptor has to return EBADF. */ if ((shutdown(listen_sock, SHUT_RDWR) != -1) && (errno != EBADF)) errx(-1, "shutdown() for invalid file descriptor does not " |