summaryrefslogtreecommitdiff
path: root/source3/smbd/mangle_hash2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-10-15 05:58:32 +0000
committerJeremy Allison <jra@samba.org>2002-10-15 05:58:32 +0000
commitb8e4a3331ddcda9339b2508e1ef24a1c2eab19cb (patch)
tree6ddbfbd262bd5d8bef00da7efef9d5ab338a93a3 /source3/smbd/mangle_hash2.c
parent4bdfae3df718e1d4945a02f1a317029c54bae883 (diff)
downloadsamba-b8e4a3331ddcda9339b2508e1ef24a1c2eab19cb.tar.gz
samba-b8e4a3331ddcda9339b2508e1ef24a1c2eab19cb.tar.bz2
samba-b8e4a3331ddcda9339b2508e1ef24a1c2eab19cb.zip
Merge Anton's 64-bit fix.
Jeremy. (This used to be commit 0644f6a68e5c1d9a2c236ab0f90d4801848a9b33)
Diffstat (limited to 'source3/smbd/mangle_hash2.c')
-rw-r--r--source3/smbd/mangle_hash2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c
index a0a3d51139..5adde19eea 100644
--- a/source3/smbd/mangle_hash2.c
+++ b/source3/smbd/mangle_hash2.c
@@ -147,14 +147,12 @@ static BOOL cache_init(void)
{
if (prefix_cache) return True;
- prefix_cache = malloc(sizeof(char *) * MANGLE_CACHE_SIZE);
+ prefix_cache = calloc(MANGLE_CACHE_SIZE, sizeof(char *));
if (!prefix_cache) return False;
- prefix_cache_hashes = malloc(sizeof(u32) * MANGLE_CACHE_SIZE);
+ prefix_cache_hashes = calloc(MANGLE_CACHE_SIZE, sizeof(u32));
if (!prefix_cache_hashes) return False;
- memset(prefix_cache, 0, sizeof(char *) * MANGLE_CACHE_SIZE);
- memset(prefix_cache_hashes, 0, sizeof(char *) * MANGLE_CACHE_SIZE);
return True;
}