summaryrefslogtreecommitdiff
path: root/gdb/bcache.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-28 15:32:27 -0700
committerTom Tromey <tromey@redhat.com>2014-01-13 07:31:29 -0700
commitfc270c357a3301fec8cc161199242bb934203cf6 (patch)
treefe791b903d33b72db0e56302327595ce45abcc98 /gdb/bcache.c
parent70ba0933adb6b8d64b0687289d51837a58b804f9 (diff)
replace XCALLOC with XCNEWVEC or XCNEW
This removes XCALLOC and replaces it either with XCNEWVEC, or, if the number of elements being requested was 1, with XCNEW. 2014-01-13 Tom Tromey <tromey@redhat.com> * defs.h (XCALLOC): Remove. * bcache.c (bcache_xmalloc): Use XCNEW, not XCALLOC. (print_bcache_statistics): Use XCNEWVEC, not XCALLOC. * dwarf2loc.c (allocate_piece_closure): Likewise. * elfread.c (elf_symfile_segments): Likewise. (elf_symfile_segments): Likewise. * gdbtypes.c (copy_type_recursive): Likewise. * i386-tdep.c (i386_gdbarch_init): Use XCNEW, not XCALLOC. * jit.c (jit_frame_sniffer): Use XCNEWVEC, not XCALLOC. * minsyms.c (prim_record_minimal_symbol_full): Use XCNEW, not XCALLOC. * mt-tdep.c (mt_gdbarch_init): Likewise. * opencl-lang.c (allocate_lval_closure): Use XCNEWVEC, not XCALLOC. * psymtab.c (psymbol_compare): Use XCNEW, not XCALLOC. * regcache.c (regcache_xmalloc_1): Use XCNEWVEC, not XCALLOC. * registry.c (registry_alloc_data): Likewise. * rs6000-tdep.c (rs6000_gdbarch_init): Use XCNEW, not XCALLOC. * s390-linux-tdep.c (s390_gdbarch_init): Likewise. * serial.c (serial_fdopen_ops): Likewise. * solib-aix.c (solib_aix_get_section_offsets): Use XCNEWVEC, not XCALLOC. * spu-tdep.c (spu_gdbarch_init): Use XCNEW, not XCALLOC. * symfile.c (default_symfile_segments): Use XCNEW and XCNEWVEC, not XCALLOC.
Diffstat (limited to 'gdb/bcache.c')
-rw-r--r--gdb/bcache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/bcache.c b/gdb/bcache.c
index 3d1280a61f..99e9184ef6 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -313,7 +313,7 @@ bcache_xmalloc (unsigned long (*hash_function)(const void *, int length),
int length))
{
/* Allocate the bcache pre-zeroed. */
- struct bcache *b = XCALLOC (1, struct bcache);
+ struct bcache *b = XCNEW (struct bcache);
if (hash_function)
b->hash_function = hash_function;
@@ -372,8 +372,8 @@ print_bcache_statistics (struct bcache *c, char *type)
lengths, and measure chain lengths. */
{
unsigned int b;
- int *chain_length = XCALLOC (c->num_buckets + 1, int);
- int *entry_size = XCALLOC (c->unique_count + 1, int);
+ int *chain_length = XCNEWVEC (int, c->num_buckets + 1);
+ int *entry_size = XCNEWVEC (int, c->unique_count + 1);
int stringi = 0;
occupied_buckets = 0;