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/huntd | |
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/huntd')
-rw-r--r-- | hunt/huntd/ctl_transact.c | 5 | ||||
-rw-r--r-- | hunt/huntd/driver.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/hunt/huntd/ctl_transact.c b/hunt/huntd/ctl_transact.c index cfbe0e65..d183bd39 100644 --- a/hunt/huntd/ctl_transact.c +++ b/hunt/huntd/ctl_transact.c @@ -1,4 +1,4 @@ -/* $NetBSD: ctl_transact.c,v 1.2 1997/10/10 16:33:01 lukem Exp $ */ +/* $NetBSD: ctl_transact.c,v 1.3 1997/10/20 00:37:16 lukem Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement @@ -14,7 +14,7 @@ #if 0 static char sccsid[] = "@(#)ctl_transact.c 5.2 (Berkeley) 3/13/86"; #else -__RCSID("$NetBSD: ctl_transact.c,v 1.2 1997/10/10 16:33:01 lukem Exp $"); +__RCSID("$NetBSD: ctl_transact.c,v 1.3 1997/10/20 00:37:16 lukem Exp $"); #endif #endif /* not lint */ @@ -46,6 +46,7 @@ ctl_transact(target, msg, type, rp) msg.type = type; daemon_addr.sin_addr = target; daemon_addr.sin_port = daemon_port; + FD_ZERO(&ctl_mask); FD_SET(ctl_sockt, &ctl_mask); /* diff --git a/hunt/huntd/driver.c b/hunt/huntd/driver.c index a6f7cf67..4b06af91 100644 --- a/hunt/huntd/driver.c +++ b/hunt/huntd/driver.c @@ -1,4 +1,4 @@ -/* $NetBSD: driver.c,v 1.4 1997/10/15 12:02:08 mrg Exp $ */ +/* $NetBSD: driver.c,v 1.5 1997/10/20 00:37:16 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: driver.c,v 1.4 1997/10/15 12:02:08 mrg Exp $"); +__RCSID("$NetBSD: driver.c,v 1.5 1997/10/20 00:37:16 lukem Exp $"); #endif /* not lint */ # include <sys/ioctl.h> @@ -367,6 +367,7 @@ init() /* * Initialize minimal select mask */ + FD_ZERO(&Fds_mask); FD_SET(Socket, &Fds_mask); FD_SET(Status, &Fds_mask); Num_fds = ((Socket > Status) ? Socket : Status) + 1; |