summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypserv
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1997-01-12 08:18:17 +0000
committerwpaul <wpaul@FreeBSD.org>1997-01-12 08:18:17 +0000
commit63a6a9d9fba4e4f99c3a7db7dbef2e7b34d6ab32 (patch)
tree2bc1d33a5b7857cb0ab13ee8a1f11c85d23e0a07 /usr.sbin/ypserv
parent995435c4929ad3717457cf76bd2d104c3ca1902d (diff)
downloadFreeBSD-src-63a6a9d9fba4e4f99c3a7db7dbef2e7b34d6ab32.zip
FreeBSD-src-63a6a9d9fba4e4f99c3a7db7dbef2e7b34d6ab32.tar.gz
Ack. When I moved the getsockopt() calls, I forgot to move the lines
that initialize the getsockopt() args (type and len) too.
Diffstat (limited to 'usr.sbin/ypserv')
-rw-r--r--usr.sbin/ypserv/yp_dnslookup.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ypserv/yp_dnslookup.c b/usr.sbin/ypserv/yp_dnslookup.c
index b64bbcf..c4d0276 100644
--- a/usr.sbin/ypserv/yp_dnslookup.c
+++ b/usr.sbin/ypserv/yp_dnslookup.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: yp_dnslookup.c,v 1.13 1997/01/07 04:48:52 wpaul Exp $
+ * $Id: yp_dnslookup.c,v 1.15 1997/01/12 08:09:28 wpaul Exp $
*/
/*
@@ -65,7 +65,7 @@
#include "yp_extern.h"
#ifndef lint
-static const char rcsid[] = "$Id: yp_dnslookup.c,v 1.13 1997/01/07 04:48:52 wpaul Exp $";
+static const char rcsid[] = "$Id: yp_dnslookup.c,v 1.15 1997/01/12 08:09:28 wpaul Exp $";
#endif
static char *parse(hp)
@@ -428,6 +428,7 @@ ypstat yp_async_lookup_name(rqstp, name)
int type, len;
/* Check for SOCK_DGRAM or SOCK_STREAM -- we need to know later */
+ type = -1; len = sizeof(type);
if (getsockopt(rqstp->rq_xprt->xp_sock, SOL_SOCKET,
SO_TYPE, &type, &len) == -1) {
yp_error("getsockopt failed: %s", strerror(errno));
@@ -446,7 +447,6 @@ ypstat yp_async_lookup_name(rqstp, name)
q->ttl = DEF_TTL;
q->xprt = rqstp->rq_xprt;
q->ypvers = rqstp->rq_vers;
- type = -1; len = sizeof(type);
q->prot_type = type;
if (q->prot_type == SOCK_DGRAM)
q->xid = svcudp_get_xid(q->xprt);
@@ -486,6 +486,7 @@ ypstat yp_async_lookup_addr(rqstp, addr)
int type, len;
/* Check for SOCK_DGRAM or SOCK_STREAM -- we need to know later */
+ type = -1; len = sizeof(type);
if (getsockopt(rqstp->rq_xprt->xp_sock, SOL_SOCKET,
SO_TYPE, &type, &len) == -1) {
yp_error("getsockopt failed: %s", strerror(errno));
@@ -513,7 +514,6 @@ ypstat yp_async_lookup_addr(rqstp, addr)
q->xprt = rqstp->rq_xprt;
q->ypvers = rqstp->rq_vers;
q->domain = NULL;
- type = -1; len = sizeof(type);
q->prot_type = type;
if (q->prot_type == SOCK_DGRAM)
q->xid = svcudp_get_xid(q->xprt);
OpenPOWER on IntegriCloud