diff options
| author | Bill Paul <wpaul@FreeBSD.org> | 1997-10-09 20:29:39 +0000 |
|---|---|---|
| committer | Bill Paul <wpaul@FreeBSD.org> | 1997-10-09 20:29:39 +0000 |
| commit | bfb109df293a8a3f8f86d9854f4737dbb7374b79 (patch) | |
| tree | c954d304da3e240a575abc753d9071f018c631a7 /usr.sbin/ypbind | |
| parent | 8d20e51f0ab610c8dde7ae93f5ca3b6522d8d217 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/ypbind')
| -rw-r--r-- | usr.sbin/ypbind/yp_ping.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ypbind/yp_ping.c b/usr.sbin/ypbind/yp_ping.c index b9386cba3a82c..31df5b832f370 100644 --- a/usr.sbin/ypbind/yp_ping.c +++ b/usr.sbin/ypbind/yp_ping.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: yp_ping.c,v 1.2 1997/05/25 18:54:11 wpaul Exp wpaul $ + * $Id: yp_ping.c,v 1.1 1997/05/25 19:49:29 wpaul Exp $ */ /* @@ -71,7 +71,7 @@ #ifndef lint /*static char *sccsid = "from: @(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";*/ /*static char *sccsid = "from: @(#)clnt_udp.c 2.2 88/08/01 4.0 RPCSRC";*/ -static const char rcsid[] = "@(#) $Id: yp_ping.c,v 1.2 1997/05/25 18:54:11 wpaul Exp wpaul $"; +static const char rcsid[] = "@(#) $Id: yp_ping.c,v 1.1 1997/05/25 19:49:29 wpaul Exp $"; #endif /* @@ -458,6 +458,7 @@ int __yp_ping(restricted_addrs, cnt, dom, port) char *foo = dom; struct cu_data *cu; enum clnt_stat (*oldfunc)(); + int validsrvs = 0; /* Set up handles. */ reqs = calloc(1, sizeof(struct ping_req *) * cnt); @@ -477,10 +478,11 @@ int __yp_ping(restricted_addrs, cnt, dom, port) any = &reqs[i]->sin; reqs[i]->xid = xid_seed; xid_seed++; + validsrvs++; } /* Make sure at least one server was assigned */ - if (reqs[0] == NULL) { + if (!validsrvs) { free(reqs); return(-1); } |
