diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-05-30 14:06:09 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-05-30 14:06:09 +0000 |
commit | 7a68cef46506bade41798091205ab800203ec194 (patch) | |
tree | d35a7a2cdde3abb83e90a8e23cf673b73fe1780f /lib/libc/net/getnetnamadr.c | |
parent | 8623650b3bbeef30f7af594d65c04bd3035fc023 (diff) |
Some extra error checking, documentation and style wrt connections
Diffstat (limited to 'lib/libc/net/getnetnamadr.c')
-rw-r--r-- | lib/libc/net/getnetnamadr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/net/getnetnamadr.c b/lib/libc/net/getnetnamadr.c index de208bbac9e..0f8ef449bb0 100644 --- a/lib/libc/net/getnetnamadr.c +++ b/lib/libc/net/getnetnamadr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getnetnamadr.c,v 1.10 1997/12/02 01:34:05 deraadt Exp $ */ +/* $OpenBSD: getnetnamadr.c,v 1.11 1999/05/30 14:06:08 niklas Exp $ */ /* * Copyright (c) 1997, Jason Downs. All rights reserved. @@ -77,7 +77,7 @@ static char sccsid[] = "@(#)getnetbyaddr.c 8.1 (Berkeley) 6/4/93"; static char sccsid_[] = "from getnetnamadr.c 1.4 (Coimbra) 93/06/03"; static char rcsid[] = "$From: getnetnamadr.c,v 8.7 1996/08/05 08:31:35 vixie Exp $"; #else -static char rcsid[] = "$OpenBSD: getnetnamadr.c,v 1.10 1997/12/02 01:34:05 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: getnetnamadr.c,v 1.11 1999/05/30 14:06:08 niklas Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -192,7 +192,11 @@ getnetanswer(answer, anslen, net_i) GETSHORT(n, cp); if (class == C_IN && type == T_PTR) { n = dn_expand(answer->buf, eom, cp, bp, buflen); +#ifdef USE_RESOLV_NAME_OK if ((n < 0) || !res_hnok(bp)) { +#else + if ((n < 0) || !_hokchar(bp)) { +#endif cp += n; return (NULL); } |