diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-11-28 11:18:19 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-11-28 11:18:19 +0000 |
commit | f12ca311c01cba335a9e4c866a0c966d2efd41a2 (patch) | |
tree | 0740f05d6deda7041887e5dfa9b981f280ff8f0c /resolv | |
parent | 9a40233fa0d4c587880f5d3d3f42813ec6e6ae32 (diff) | |
download | glibc-f12ca311c01cba335a9e4c866a0c966d2efd41a2.tar glibc-f12ca311c01cba335a9e4c866a0c966d2efd41a2.tar.gz glibc-f12ca311c01cba335a9e4c866a0c966d2efd41a2.tar.bz2 glibc-f12ca311c01cba335a9e4c866a0c966d2efd41a2.zip |
Updated to fedora-glibc-20061128T1037cvs/fedora-glibc-2_5_90-8
Diffstat (limited to 'resolv')
-rw-r--r-- | resolv/mapv4v6addr.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/resolv/mapv4v6addr.h b/resolv/mapv4v6addr.h index bc3290f162..7f85f7d5e3 100644 --- a/resolv/mapv4v6addr.h +++ b/resolv/mapv4v6addr.h @@ -56,16 +56,14 @@ static void map_v4v6_address (const char *src, char *dst) { u_char *p = (u_char *) dst; - char tmp[INADDRSZ]; int i; - /* Stash a temporary copy so our caller can update in place. */ - memcpy (tmp, src, INADDRSZ); + /* Move the IPv4 part to the right position. */ + memcpy (dst + 12, src, INADDRSZ); + /* Mark this ipv6 addr as a mapped ipv4. */ for (i = 0; i < 10; i++) *p++ = 0x00; *p++ = 0xff; - *p++ = 0xff; - /* Retrieve the saved copy and we're done. */ - memcpy ((void *) p, tmp, INADDRSZ); + *p = 0xff; } |