diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-09-29 16:45:44 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-09-29 16:45:44 +0000 |
commit | 3107c0c5ae2c0dc2854471cb028e8a37a5e59e51 (patch) | |
tree | f21aa4585bc849d943a0211b34b6aed61d00376f /nscd/grpcache.c | |
parent | 062a2a18f425f8b6c667b7239afeed2dd80d5e45 (diff) | |
download | glibc-3107c0c5ae2c0dc2854471cb028e8a37a5e59e51.tar.gz |
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/grpcache.c')
-rw-r--r-- | nscd/grpcache.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nscd/grpcache.c b/nscd/grpcache.c index 983b297ad2..b1634a1009 100644 --- a/nscd/grpcache.c +++ b/nscd/grpcache.c @@ -23,6 +23,7 @@ #include <grp.h> #include <stddef.h> #include <stdio.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -117,7 +118,7 @@ cache_addgr (struct database *db, int fd, request_header *req, void *key, size_t gr_name_len = strlen (grp->gr_name) + 1; size_t gr_passwd_len = strlen (grp->gr_passwd) + 1; size_t gr_mem_cnt = 0; - size_t *gr_mem_len; + uint32_t *gr_mem_len; size_t gr_mem_len_total = 0; char *gr_name; char *cp; @@ -131,7 +132,7 @@ cache_addgr (struct database *db, int fd, request_header *req, void *key, /* Determine the length of all members. */ while (grp->gr_mem[gr_mem_cnt]) ++gr_mem_cnt; - gr_mem_len = (size_t *) alloca (gr_mem_cnt * sizeof (size_t)); + gr_mem_len = (uint32_t *) alloca (gr_mem_cnt * sizeof (uint32_t)); for (gr_mem_cnt = 0; grp->gr_mem[gr_mem_cnt]; ++gr_mem_cnt) { gr_mem_len[gr_mem_cnt] = strlen (grp->gr_mem[gr_mem_cnt]) + 1; @@ -141,7 +142,7 @@ cache_addgr (struct database *db, int fd, request_header *req, void *key, /* We allocate all data in one memory block: the iov vector, the response header and the dataset itself. */ total = (sizeof (struct groupdata) - + gr_mem_cnt * sizeof (size_t) + + gr_mem_cnt * sizeof (uint32_t) + gr_name_len + gr_passwd_len + gr_mem_len_total); data = (struct groupdata *) malloc (total + n); if (data == NULL) @@ -157,7 +158,7 @@ cache_addgr (struct database *db, int fd, request_header *req, void *key, cp = data->strdata; /* This is the member string length array. */ - cp = mempcpy (cp, gr_mem_len, gr_mem_cnt * sizeof (size_t)); + cp = mempcpy (cp, gr_mem_len, gr_mem_cnt * sizeof (uint32_t)); gr_name = cp; cp = mempcpy (cp, grp->gr_name, gr_name_len); cp = mempcpy (cp, grp->gr_passwd, gr_passwd_len); |