summaryrefslogtreecommitdiff
path: root/nscd/hstcache.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-09-29 16:45:44 +0000
committerUlrich Drepper <drepper@redhat.com>2000-09-29 16:45:44 +0000
commit3107c0c5ae2c0dc2854471cb028e8a37a5e59e51 (patch)
treef21aa4585bc849d943a0211b34b6aed61d00376f /nscd/hstcache.c
parent062a2a18f425f8b6c667b7239afeed2dd80d5e45 (diff)
Update.
2000-09-29 David Mosberger <davidm@hpl.hp.com> * sysdeps/unix/sysv/linux/ia64/sysdep.S (__ia64_syscall): Cleanup. * sysdeps/unix/sysv/linux/ia64/sysdep.h (CALL_MCOUNT): Implement. 2000-06-10 David Mosberger <davidm@hpl.hp.com> * sysdeps/unix/sysv/linux/ia64/setjmp.S: Fix it so it actually works: call to __sigjmp_save must be done unconditionally to ensure jmp_buf is initialized properly. 2000-09-27 Andreas Jaeger <aj@suse.de> * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Synch with Linux 2.4.0-test9-pre7. 2000-09-29 Jakub Jelinek <jakub@redhat.com> * nscd/nscd-client.h (NSCD_VERSION): Bump to 3. Use int32_t where appropriate. * nscd/nscd_gethst_r.c (nscd_gethst_r): Use uint32_t instead of size_t where appropriate. * nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise. * nscd/hstcache.c (cache_addhst): Likewise. * nscd/grpcache.c (cache_addgr): Likewise.
Diffstat (limited to 'nscd/hstcache.c')
-rw-r--r--nscd/hstcache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nscd/hstcache.c b/nscd/hstcache.c
index 31afbdddda..e8444d825f 100644
--- a/nscd/hstcache.c
+++ b/nscd/hstcache.c
@@ -125,7 +125,7 @@ cache_addhst (struct database *db, int fd, request_header *req, void *key,
struct hostdata *data;
size_t h_name_len = strlen (hst->h_name) + 1;
size_t h_aliases_cnt;
- size_t *h_aliases_len;
+ uint32_t *h_aliases_len;
size_t h_addr_list_cnt;
int addr_list_type;
char *addresses;
@@ -139,7 +139,7 @@ cache_addhst (struct database *db, int fd, request_header *req, void *key,
for (cnt = 0; hst->h_aliases[cnt] != NULL; ++cnt)
++h_aliases_cnt;
/* Determine the length of all aliases. */
- h_aliases_len = alloca (h_aliases_cnt * sizeof (size_t));
+ h_aliases_len = (uint32_t *) alloca (h_aliases_cnt * sizeof (uint32_t));
total = 0;
for (cnt = 0; cnt < h_aliases_cnt; ++cnt)
{
@@ -156,7 +156,7 @@ cache_addhst (struct database *db, int fd, request_header *req, void *key,
the response header and the dataset itself. */
total += (sizeof (struct hostdata)
+ h_name_len
- + h_aliases_cnt * sizeof (size_t)
+ + h_aliases_cnt * sizeof (uint32_t)
+ h_addr_list_cnt * hst->h_length);
data = (struct hostdata *) malloc (total + req->key_len);
@@ -175,7 +175,7 @@ cache_addhst (struct database *db, int fd, request_header *req, void *key,
cp = data->strdata;
cp = mempcpy (cp, hst->h_name, h_name_len);
- cp = mempcpy (cp, h_aliases_len, h_aliases_cnt * sizeof (size_t));
+ cp = mempcpy (cp, h_aliases_len, h_aliases_cnt * sizeof (uint32_t));
/* The normal addresses first. */
addresses = cp;