diff options
author | lukem <lukem@NetBSD.org> | 1997-10-20 00:37:14 +0000 |
---|---|---|
committer | lukem <lukem@NetBSD.org> | 1997-10-20 00:37:14 +0000 |
commit | e0bdecd84aaeef731c9a77b4b2a8cc8aa4516b52 (patch) | |
tree | 3419c96043eeb5f76999e9317b523efc282cda54 /hunt/hunt/hunt.c | |
parent | 1a42f2efb90085739090202bc48bccbcb7a1acdb (diff) | |
download | bsdgames-darwin-e0bdecd84aaeef731c9a77b4b2a8cc8aa4516b52.tar.gz bsdgames-darwin-e0bdecd84aaeef731c9a77b4b2a8cc8aa4516b52.tar.zst bsdgames-darwin-e0bdecd84aaeef731c9a77b4b2a8cc8aa4516b52.zip |
FD_ZERO select mask before FD_SET-ing it
Diffstat (limited to 'hunt/hunt/hunt.c')
-rw-r--r-- | hunt/hunt/hunt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hunt/hunt/hunt.c b/hunt/hunt/hunt.c index b7470590..08b492bc 100644 --- a/hunt/hunt/hunt.c +++ b/hunt/hunt/hunt.c @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.c,v 1.3 1997/10/11 08:13:41 lukem Exp $ */ +/* $NetBSD: hunt.c,v 1.4 1997/10/20 00:37:14 lukem Exp $ */ /* * Hunt * Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold @@ -7,7 +7,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hunt.c,v 1.3 1997/10/11 08:13:41 lukem Exp $"); +__RCSID("$NetBSD: hunt.c,v 1.4 1997/10/20 00:37:14 lukem Exp $"); #endif /* not lint */ # include <sys/stat.h> @@ -508,6 +508,7 @@ get_response: listmax * sizeof(SOCKET)); } + FD_ZERO(&mask); FD_SET(test_socket, &mask); if (select(test_socket + 1, &mask, NULL, NULL, &wait) == 1 && recvfrom(test_socket, (char *) &port_num, sizeof(port_num), |