diff options
Diffstat (limited to 'src/lib/libc')
| -rw-r--r-- | src/lib/libc/net/rcmd.c | 5 | ||||
| -rw-r--r-- | src/lib/libc/net/res_debug.c | 7 | ||||
| -rw-r--r-- | src/lib/libc/net/res_send.c | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libc/net/rcmd.c b/src/lib/libc/net/rcmd.c index ad701acf0e..c933f5b447 100644 --- a/src/lib/libc/net/rcmd.c +++ b/src/lib/libc/net/rcmd.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | */ | 34 | */ |
| 35 | 35 | ||
| 36 | #if defined(LIBC_SCCS) && !defined(lint) | 36 | #if defined(LIBC_SCCS) && !defined(lint) |
| 37 | static char *rcsid = "$OpenBSD: rcmd.c,v 1.30 1998/02/12 02:21:19 deraadt Exp $"; | 37 | static char *rcsid = "$OpenBSD: rcmd.c,v 1.31 1998/03/19 00:30:05 millert Exp $"; |
| 38 | #endif /* LIBC_SCCS and not lint */ | 38 | #endif /* LIBC_SCCS and not lint */ |
| 39 | 39 | ||
| 40 | #include <sys/param.h> | 40 | #include <sys/param.h> |
| @@ -402,7 +402,6 @@ __ivaliduser(hostf, raddrl, luser, ruser) | |||
| 402 | const char *luser, *ruser; | 402 | const char *luser, *ruser; |
| 403 | { | 403 | { |
| 404 | register char *user, *p; | 404 | register char *user, *p; |
| 405 | int ch; | ||
| 406 | char *buf; | 405 | char *buf; |
| 407 | const char *auser, *ahost; | 406 | const char *auser, *ahost; |
| 408 | int hostok, userok; | 407 | int hostok, userok; |
| @@ -427,7 +426,7 @@ __ivaliduser(hostf, raddrl, luser, ruser) | |||
| 427 | continue; | 426 | continue; |
| 428 | if (*p == ' ' || *p == '\t') { | 427 | if (*p == ' ' || *p == '\t') { |
| 429 | *p++ = '\0'; | 428 | *p++ = '\0'; |
| 430 | while (*p == ' ' || *p == '\t' && p < buf + buflen) | 429 | while ((*p == ' ' || *p == '\t') && p < buf + buflen) |
| 431 | p++; | 430 | p++; |
| 432 | if (p >= buf + buflen) | 431 | if (p >= buf + buflen) |
| 433 | continue; | 432 | continue; |
diff --git a/src/lib/libc/net/res_debug.c b/src/lib/libc/net/res_debug.c index 908ad421b7..c2725395a0 100644 --- a/src/lib/libc/net/res_debug.c +++ b/src/lib/libc/net/res_debug.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: res_debug.c,v 1.8 1997/07/09 01:08:51 millert Exp $ */ | 1 | /* $OpenBSD: res_debug.c,v 1.9 1998/03/19 00:30:06 millert Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * ++Copyright++ 1985, 1990, 1993 | 4 | * ++Copyright++ 1985, 1990, 1993 |
| @@ -82,7 +82,7 @@ | |||
| 82 | static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93"; | 82 | static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93"; |
| 83 | static char rcsid[] = "$From: res_debug.c,v 8.19 1996/11/26 10:11:23 vixie Exp $"; | 83 | static char rcsid[] = "$From: res_debug.c,v 8.19 1996/11/26 10:11:23 vixie Exp $"; |
| 84 | #else | 84 | #else |
| 85 | static char rcsid[] = "$OpenBSD: res_debug.c,v 1.8 1997/07/09 01:08:51 millert Exp $"; | 85 | static char rcsid[] = "$OpenBSD: res_debug.c,v 1.9 1998/03/19 00:30:06 millert Exp $"; |
| 86 | #endif | 86 | #endif |
| 87 | #endif /* LIBC_SCCS and not lint */ | 87 | #endif /* LIBC_SCCS and not lint */ |
| 88 | 88 | ||
| @@ -437,11 +437,12 @@ __p_fqnname(cp, msg, msglen, name, namelen) | |||
| 437 | if ((n = dn_expand(msg, cp + msglen, cp, name, namelen)) < 0) | 437 | if ((n = dn_expand(msg, cp + msglen, cp, name, namelen)) < 0) |
| 438 | return (NULL); | 438 | return (NULL); |
| 439 | newlen = strlen (name); | 439 | newlen = strlen (name); |
| 440 | if (newlen == 0 || name[newlen - 1] != '.') | 440 | if (newlen == 0 || name[newlen - 1] != '.') { |
| 441 | if (newlen+1 >= namelen) /* Lack space for final dot */ | 441 | if (newlen+1 >= namelen) /* Lack space for final dot */ |
| 442 | return (NULL); | 442 | return (NULL); |
| 443 | else | 443 | else |
| 444 | strcpy(name + newlen, "."); | 444 | strcpy(name + newlen, "."); |
| 445 | } | ||
| 445 | return (cp + n); | 446 | return (cp + n); |
| 446 | } | 447 | } |
| 447 | 448 | ||
diff --git a/src/lib/libc/net/res_send.c b/src/lib/libc/net/res_send.c index b89398aab3..0cda3510eb 100644 --- a/src/lib/libc/net/res_send.c +++ b/src/lib/libc/net/res_send.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: res_send.c,v 1.7 1997/06/04 03:18:41 dm Exp $ */ | 1 | /* $OpenBSD: res_send.c,v 1.8 1998/03/19 00:30:08 millert Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * ++Copyright++ 1985, 1989, 1993 | 4 | * ++Copyright++ 1985, 1989, 1993 |
| @@ -60,7 +60,7 @@ | |||
| 60 | static char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; | 60 | static char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; |
| 61 | static char rcsid[] = "$From: res_send.c,v 8.12 1996/10/08 04:51:06 vixie Exp $"; | 61 | static char rcsid[] = "$From: res_send.c,v 8.12 1996/10/08 04:51:06 vixie Exp $"; |
| 62 | #else | 62 | #else |
| 63 | static char rcsid[] = "$OpenBSD: res_send.c,v 1.7 1997/06/04 03:18:41 dm Exp $"; | 63 | static char rcsid[] = "$OpenBSD: res_send.c,v 1.8 1998/03/19 00:30:08 millert Exp $"; |
| 64 | #endif | 64 | #endif |
| 65 | #endif /* LIBC_SCCS and not lint */ | 65 | #endif /* LIBC_SCCS and not lint */ |
| 66 | 66 | ||
| @@ -751,12 +751,12 @@ read_len: | |||
| 751 | } /*foreach ns*/ | 751 | } /*foreach ns*/ |
| 752 | } /*foreach retry*/ | 752 | } /*foreach retry*/ |
| 753 | res_close(); | 753 | res_close(); |
| 754 | if (!v_circuit) | 754 | if (!v_circuit) { |
| 755 | if (!gotsomewhere) | 755 | if (!gotsomewhere) |
| 756 | errno = ECONNREFUSED; /* no nameservers found */ | 756 | errno = ECONNREFUSED; /* no nameservers found */ |
| 757 | else | 757 | else |
| 758 | errno = ETIMEDOUT; /* no answer obtained */ | 758 | errno = ETIMEDOUT; /* no answer obtained */ |
| 759 | else | 759 | } else |
| 760 | errno = terrno; | 760 | errno = terrno; |
| 761 | return (-1); | 761 | return (-1); |
| 762 | } | 762 | } |
