diff options
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 " |