diff options
author | Jim Meyering <meyering@redhat.com> | 2008-01-02 18:09:48 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-01-14 17:57:50 +0100 |
commit | bb553d94c22340eec3b3a07a1a7b88b8415181c6 (patch) | |
tree | 4665f5c62b20a9382df037007f37c6142dbf716a /libidu | |
parent | 8d89b6b23e297a60385ce7576dbd13ea14acbbe1 (diff) | |
download | idutils-bb553d94c22340eec3b3a07a1a7b88b8415181c6.tar.gz idutils-bb553d94c22340eec3b3a07a1a7b88b8415181c6.tar.bz2 idutils-bb553d94c22340eec3b3a07a1a7b88b8415181c6.zip |
Don't cast x*alloc return value.
* libidu/hash.c (hash_rehash): Remove cast.
(hash_init): Likewise.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Diffstat (limited to 'libidu')
-rw-r--r-- | libidu/hash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libidu/hash.c b/libidu/hash.c index 7c6087b..bc64ad5 100644 --- a/libidu/hash.c +++ b/libidu/hash.c @@ -1,5 +1,5 @@ /* hash.c -- hash table maintenance - Copyright (C) 1995, 1999, 2007 Free Software Foundation, Inc. + Copyright (C) 1995, 1999, 2007-2008 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> This program is free software; you can redistribute it and/or modify @@ -46,7 +46,7 @@ hash_init (struct hash_table* ht, unsigned long size, { ht->ht_size = round_up_2 (size); ht->ht_empty_slots = ht->ht_size; - ht->ht_vec = (void**) xcalloc (ht->ht_size, sizeof(struct token *)); + ht->ht_vec = xcalloc (ht->ht_size, sizeof(struct token *)); if (ht->ht_vec == 0) error (1, 0, _("can't allocate %ld bytes for hash table: memory exhausted"), ht->ht_size * sizeof(struct token *)); @@ -244,7 +244,7 @@ hash_rehash (struct hash_table* ht) ht->ht_capacity = ht->ht_size - (ht->ht_size >> 4); } ht->ht_rehashes++; - ht->ht_vec = (void **) xcalloc (ht->ht_size, sizeof(struct token *)); + ht->ht_vec = xcalloc (ht->ht_size, sizeof(struct token *)); for (ovp = old_vec; ovp < &old_vec[old_ht_size]; ovp++) { |