diff options
author | Roland McGrath <roland@gnu.org> | 1996-05-24 20:16:39 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-05-24 20:16:39 +0000 |
commit | 613a76ff52a680e71db772306a260b9cb7f95b49 (patch) | |
tree | 7c6ff1e04f1cadef4b95c93e295d3df2ad0631d0 /resolv/inet_pton.c | |
parent | 510ca033d66c47e0dc54550928dece59799a0136 (diff) | |
download | glibc-613a76ff52a680e71db772306a260b9cb7f95b49.tar glibc-613a76ff52a680e71db772306a260b9cb7f95b49.tar.gz glibc-613a76ff52a680e71db772306a260b9cb7f95b49.tar.bz2 glibc-613a76ff52a680e71db772306a260b9cb7f95b49.zip |
Fri May 24 02:31:36 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/speed.c: Add new speed value 460800.
Thu May 23 23:09:33 1996 Ulrich Drepper <drepper@cygnus.com>
* FAQ: Add answer for 100% source code compatibility to Linux
libc by David Mosberger-Tang.
Update from bind-4.3.4-T3B.
* inet/arpa/inet.h: Add prototypes for inet_pton, inet_ntop,
inet_nsap_addr, and inet_nsap_ntoa.
* resolv/gethnamaddr.c: Correct compatibility problems (sprintf),
remove fourth argument to inet_pton and correct handling of
host_addr passing.
* resolv/inet_ntop.c: Correct compatibility problems (sprintf).
* resolv/inet_pton.c: Remove fourth argument.
* resolv/resolv.h: Remove prototypes for inet_nsap_addr and
inet_nsap_ntoa. Now on <arpa/inet.h>.
* stdlib/gmp-impl.h: Add prototypes for internal functions.
Thu May 23 22:49:15 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* Rules (subdir_install): Remove dep on sor-$(subdir).
(static-only-routines): Removed variable and associated rules.
* sysdeps/unix/sysv/linux/alpha/Makefile (headers): Add
sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/ffs.S,
sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/start.S,
Diffstat (limited to 'resolv/inet_pton.c')
-rw-r--r-- | resolv/inet_pton.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/resolv/inet_pton.c b/resolv/inet_pton.c index 385dc25337..cfc069d891 100644 --- a/resolv/inet_pton.c +++ b/resolv/inet_pton.c @@ -37,7 +37,7 @@ static int inet_pton4 __P((const char *src, u_char *dst)); static int inet_pton6 __P((const char *src, u_char *dst)); /* int - * inet_pton(af, src, dst, size) + * inet_pton(af, src, dst) * convert from presentation format (which usually means ASCII printable) * to network format (which is usually some kind of binary format). * return: @@ -48,24 +48,15 @@ static int inet_pton6 __P((const char *src, u_char *dst)); * Paul Vixie, 1996. */ int -inet_pton(af, src, dst, size) +inet_pton(af, src, dst) int af; const char *src; void *dst; - size_t size; { switch (af) { case AF_INET: - if (size < INADDRSZ) { - errno = ENOSPC; - return (-1); - } return (inet_pton4(src, dst)); case AF_INET6: - if (size < IN6ADDRSZ) { - errno = ENOSPC; - return (-1); - } return (inet_pton6(src, dst)); default: errno = EINVAL; @@ -207,12 +198,12 @@ inet_pton6(src, dst) * Since some memmove()'s erroneously fail to handle * overlapping regions, we'll do the shift by hand. */ - const howmany = tp - colonp; + const int n = tp - colonp; int i; - for (i = 1; i <= howmany; i++) { - endp[- i] = colonp[howmany - i]; - colonp[howmany - i] = 0; + for (i = 1; i <= n; i++) { + endp[- i] = colonp[n - i]; + colonp[n - i] = 0; } tp = endp; } |