From: Paul Eggert Date: Fri, 22 Jul 2005 22:30:13 +0000 (+0000) Subject: * lib/bitset.c (bitset_alloc): Don't cast xcalloc result. X-Git-Tag: BISON-2_1~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89519adfbef077ae28b34d2b04e3e688ae05399f;p=platform%2Fupstream%2Fbison.git * lib/bitset.c (bitset_alloc): Don't cast xcalloc result. * lib/bitset_stats.c (bitset_stats_init): Likewise. * lib/bitsetv.c (bitsetv_alloc): Likewise. --- diff --git a/lib/bitset.c b/lib/bitset.c index 0cc3ee5..ddbef84 100644 --- a/lib/bitset.c +++ b/lib/bitset.c @@ -138,7 +138,7 @@ bitset_alloc (bitset_bindex n_bits, enum bitset_type type) bytes = bitset_bytes (type, n_bits); - bset = (bitset) xcalloc (1, bytes); + bset = xcalloc (1, bytes); /* The cache is disabled until some elements are allocated. If we have variable length arrays, then we may need to allocate a dummy diff --git a/lib/bitset_stats.c b/lib/bitset_stats.c index 48cf5c7..702e184 100644 --- a/lib/bitset_stats.c +++ b/lib/bitset_stats.c @@ -698,25 +698,25 @@ bitset_stats_init (bitset bset, bitset_bindex n_bits, enum bitset_type type) { case BITSET_ARRAY: bytes = abitset_bytes (n_bits); - sbset = (bitset) xcalloc (1, bytes); + sbset = xcalloc (1, bytes); abitset_init (sbset, n_bits); break; case BITSET_LIST: bytes = lbitset_bytes (n_bits); - sbset = (bitset) xcalloc (1, bytes); + sbset = xcalloc (1, bytes); lbitset_init (sbset, n_bits); break; case BITSET_TABLE: bytes = ebitset_bytes (n_bits); - sbset = (bitset) xcalloc (1, bytes); + sbset = xcalloc (1, bytes); ebitset_init (sbset, n_bits); break; case BITSET_VARRAY: bytes = vbitset_bytes (n_bits); - sbset = (bitset) xcalloc (1, bytes); + sbset = xcalloc (1, bytes); vbitset_init (sbset, n_bits); break; diff --git a/lib/bitsetv.c b/lib/bitsetv.c index e89f7da..90d1e1b 100644 --- a/lib/bitsetv.c +++ b/lib/bitsetv.c @@ -47,7 +47,7 @@ bitsetv_alloc (bitset_bindex n_vecs, bitset_bindex n_bits, /* Allocate vector table at head of bitset array. */ vector_bytes = (n_vecs + 1) * sizeof (bitset) + bytes - 1; vector_bytes -= vector_bytes % bytes; - bsetv = (bitset *) xcalloc (1, vector_bytes + bytes * n_vecs); + bsetv = xcalloc (1, vector_bytes + bytes * n_vecs); for (i = 0; i < n_vecs; i++) {