Use canonicalize_file_name unconditionally
[deliverable/binutils-gdb.git] / gdb / bcache.c
index 3d1280a61fa57d686cb99366678d73f2bfb4b2f7..ac14ba4d4fcb49fa11cf42ce7e5a2e583687bfb4 100644 (file)
 #include "defs.h"
 #include "gdb_obstack.h"
 #include "bcache.h"
-#include <string.h>            /* For memcpy declaration */
-#include "gdb_assert.h"
-
-#include <stddef.h>
-#include <stdlib.h>
 
 /* The type used to hold a single bcache string.  The user data is
    stored in d.data.  Since it can be any type, it needs to have the
@@ -313,7 +308,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 +367,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;
This page took 0.025788 seconds and 4 git commands to generate.