summaryrefslogtreecommitdiffstats
path: root/lib/hash.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-08-18 14:13:29 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-08-18 14:13:29 -0700
commitaa990a9f58b5f46da95eb360049577a8833d649e (patch)
treefaeff19a39b9c1df101fe381920e52178011e99a /lib/hash.c
parente5d63369e1f3fdc1c22ae15fe477de1f97022703 (diff)
downloadquagga-aa990a9f58b5f46da95eb360049577a8833d649e.tar.bz2
quagga-aa990a9f58b5f46da95eb360049577a8833d649e.tar.xz
Use XCALLOC
Replace calls to XMALLOC followed by memset with XCALLOC.
Diffstat (limited to 'lib/hash.c')
-rw-r--r--lib/hash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/hash.c b/lib/hash.c
index 3884051f..f705e5dd 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -32,9 +32,8 @@ hash_create_size (unsigned int size, unsigned int (*hash_key) (void *),
struct hash *hash;
hash = XMALLOC (MTYPE_HASH, sizeof (struct hash));
- hash->index = XMALLOC (MTYPE_HASH_INDEX,
+ hash->index = XCALLOC (MTYPE_HASH_INDEX,
sizeof (struct hash_backet *) * size);
- memset (hash->index, 0, sizeof (struct hash_backet *) * size);
hash->size = size;
hash->hash_key = hash_key;
hash->hash_cmp = hash_cmp;