From: John Kohl Date: Thu, 19 Apr 1990 15:22:50 +0000 (+0000) Subject: missing extra parens around recvfrom. X-Git-Tag: krb5-1.0-alpha2~877 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=305d1c0bbae9356ca9f54ef580100e7a02eb7c21;p=krb5.git missing extra parens around recvfrom. close the sockets, not the index to the sockets, and only do the active sockets. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@518 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c index acc17c542..f38ec3183 100644 --- a/src/lib/krb5/os/sendto_kdc.c +++ b/src/lib/krb5/os/sendto_kdc.c @@ -123,12 +123,12 @@ OLDDECLARG(krb5_data *, reply) &waitlen)) { if (nready == -1) continue; /* XXX */ - if (cc = recvfrom(socklist[addr[host].sa_family], - reply->data, - reply->length, - 0, - &fromaddr, - &fromlen) == -1) + if ((cc = recvfrom(socklist[addr[host].sa_family], + reply->data, + reply->length, + 0, + &fromaddr, + &fromlen)) == -1) continue; /* XXX */ if (bcmp((char *)&fromaddr, (char *)&addr[host], fromlen)) { @@ -159,7 +159,8 @@ OLDDECLARG(krb5_data *, reply) retval = KRB5_KDC_UNREACH; out: for (i = 0; i < AF_MAX; i++) - (void) close(i); + if (socklist[i] != -1) + (void) close(socklist[i]); free((char *)addr); if (retval) { free(reply->data);