diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-01-11 23:37:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-01-11 23:37:02 +0000 |
commit | 875c047efc854a58a5e966c39a6db43ee04e958e (patch) | |
tree | 50b284a683087097ebdd20c87350a963b27812c6 /usr.sbin/ypserv | |
parent | 55ce0137c695eeb1006cc8c4e1c2b253e653f0b2 (diff) |
fix closedown() stub generated by rpcgen(1)
Diffstat (limited to 'usr.sbin/ypserv')
-rw-r--r-- | usr.sbin/ypserv/ypserv/ypserv.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/usr.sbin/ypserv/ypserv/ypserv.c b/usr.sbin/ypserv/ypserv/ypserv.c index 71ca31730f1..f0ad24958ad 100644 --- a/usr.sbin/ypserv/ypserv/ypserv.c +++ b/usr.sbin/ypserv/ypserv/ypserv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypserv.c,v 1.14 2000/11/18 03:21:36 deraadt Exp $ */ +/* $OpenBSD: ypserv.c,v 1.15 2001/01/11 23:37:01 deraadt Exp $ */ /* * Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se> @@ -32,7 +32,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: ypserv.c,v 1.14 2000/11/18 03:21:36 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ypserv.c,v 1.15 2001/01/11 23:37:01 deraadt Exp $"; #endif #include "yp.h" @@ -99,17 +99,14 @@ static void closedown() { if (_rpcsvcdirty == 0) { - extern fd_set svc_fdset; - static int size; + extern fd_set *__svc_fdset; + extern int __svc_fdsetsize; int i, openfd; if (_rpcfdtype == SOCK_DGRAM) exit(0); - if (size == 0) { - size = getdtablesize(); - } - for (i = 0, openfd = 0; i < size && openfd < 2; i++) - if (FD_ISSET(i, &svc_fdset)) + for (i = 0, openfd = 0; i < __svc_fdsetsize && openfd < 2; i++) + if (FD_ISSET(i, __svc_fdset)) openfd++; if (openfd <= (_rpcpmstart?0:1)) exit(0); |