about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-07-09 22:04:10 +0000
committerUlrich Drepper <drepper@redhat.com>1999-07-09 22:04:10 +0000
commitfbb802fc7dcc06b8f76bf75de7529edabdd19d4f (patch)
treed6d9aabe17de37886a1a661de6897a7c2f772243
parentae3c15710218925e65d044f9c2f0abd85ead68cf (diff)
downloadglibc-fbb802fc7dcc06b8f76bf75de7529edabdd19d4f.tar.gz
glibc-fbb802fc7dcc06b8f76bf75de7529edabdd19d4f.tar.xz
glibc-fbb802fc7dcc06b8f76bf75de7529edabdd19d4f.zip
Update.
-rw-r--r--ChangeLog5
-rw-r--r--nscd/nscd_gethst_r.c8
2 files changed, 1 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index f359b936c1..b22b91550a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,11 +17,6 @@
 	* pwd/Versions (getpwent_r, getpwuid_r): Likewise.
 	* shadow/Versions (getspent_r, getspnam_r): Likewise.
 
-1999-07-09  Cristian Gafton  <gafton@redhat.com>
-
-	* nscd/nscd_gethst_r.c (nscd_gethst_r): Make sure
-	resultbuf->h_addr_list addresses are correctly aligned.
-
 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
 
 	* sysdeps/i386/bits/string.h (__memcpy_c): Help some stupid old
diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c
index 6ee0826e98..5dbe05d938 100644
--- a/nscd/nscd_gethst_r.c
+++ b/nscd/nscd_gethst_r.c
@@ -182,7 +182,7 @@ nscd_gethst_r (const char *key, size_t keylen, request_type type,
       align2 = ((__alignof__ (char *) - ((cp + align1 + hst_resp.h_name_len)
 					 - ((char *) 0)))
 		& (__alignof__ (char *) - 1));
-      if (buflen < (align1 + hst_resp.h_name_len + align2 +
+      if (buflen < (align1 + hst_resp.h_name_len + align2
 		    + ((hst_resp.h_aliases_cnt + hst_resp.h_addr_list_cnt + 2)
 		       * sizeof (char *))
 		    + hst_resp.h_addr_list_cnt * (type == AF_INET
@@ -214,12 +214,6 @@ nscd_gethst_r (const char *key, size_t keylen, request_type type,
 		   + hst_resp.h_aliases_cnt * sizeof (size_t));
 
       n = 2;
-
-      /* These things must be aligned or ntohl will cause havoc.  */
-      align = ((__alignof__ (char *) - (cp - ((char *) 0)))
-	       & (__alignof__ (char *) - 1));
-      cp += align;
-
       if (type == GETHOSTBYADDR || type == GETHOSTBYNAME)
 	{
 	  vec[2].iov_base = cp;