* elf32-xtensa.c (ebb_propose_action): Fix argument order.
[deliverable/binutils-gdb.git] / gdb / bcache.c
index ec8b777acd669e5217ae91a3c3158f9752209af5..0bc533ebfefc35058f27dab49774eda6f98290ca 100644 (file)
@@ -195,8 +195,8 @@ expand_hash_table (struct bcache *bcache)
 /* Find a copy of the LENGTH bytes at ADDR in BCACHE.  If BCACHE has
    never seen those bytes before, add a copy of them to BCACHE.  In
    either case, return a pointer to BCACHE's copy of that string.  */
-void *
-bcache (const void *addr, int length, struct bcache *bcache)
+static void *
+bcache_data (const void *addr, int length, struct bcache *bcache)
 {
   unsigned long full_hash;
   unsigned short half_hash;
@@ -247,6 +247,17 @@ bcache (const void *addr, int length, struct bcache *bcache)
   }
 }
 
+void *
+deprecated_bcache (const void *addr, int length, struct bcache *bcache)
+{
+  return bcache_data (addr, length, bcache);
+}
+
+const void *
+bcache (const void *addr, int length, struct bcache *bcache)
+{
+  return bcache_data (addr, length, bcache);
+}
 \f
 /* Allocating and freeing bcaches.  */
 
@@ -255,7 +266,10 @@ bcache_xmalloc (void)
 {
   /* Allocate the bcache pre-zeroed.  */
   struct bcache *b = XCALLOC (1, struct bcache);
-  obstack_specify_allocation (&b->cache, 0, 0, xmalloc, xfree);
+  /* We could use obstack_specify_allocation here instead, but
+     gdb_obstack.h specifies the allocation/deallocation
+     functions.  */
+  obstack_init (&b->cache);
   return b;
 }
 
@@ -289,7 +303,7 @@ print_percentage (int portion, int total)
   if (total == 0)
     printf_filtered ("(not applicable)\n");
   else
-    printf_filtered ("%3d%%\n", portion * 100 / total);
+    printf_filtered ("%3d%%\n", (int) (portion * 100.0 / total));
 }
 
 
This page took 0.024166 seconds and 4 git commands to generate.