block.c (allocate_block): Use OBSTACK_ZALLOC instead of obstack_alloc.
authorDoug Evans <xdje42@gmail.com>
Sun, 26 Oct 2014 18:36:59 +0000 (11:36 -0700)
committerDoug Evans <xdje42@gmail.com>
Sun, 26 Oct 2014 18:36:59 +0000 (11:36 -0700)
gdb/ChangeLog:

* block.c (allocate_block): Use OBSTACK_ZALLOC instead of
obstack_alloc.

gdb/ChangeLog
gdb/block.c

index fd417f787bebac516f6a3daec9d48cdef2905ceb..16c9ec83cf5efb8b800240563f6bcd9f483e11c3 100644 (file)
@@ -1,3 +1,8 @@
+2014-10-26  Doug Evans  <xdje42@gmail.com>
+
+       * block.c (allocate_block): Use OBSTACK_ZALLOC instead of
+       obstack_alloc.
+
 2014-10-26  Doug Evans  <xdje42@gmail.com>
 
        * parser-defs.h (block_found): Move decl from here ...
index 4a31ea9a4b7d4dce295eeb8579b1a3ba97759392..8d40c9d59319e9bc78b2a58f358d4ce443833860 100644 (file)
@@ -373,14 +373,7 @@ block_global_block (const struct block *block)
 struct block *
 allocate_block (struct obstack *obstack)
 {
-  struct block *bl = obstack_alloc (obstack, sizeof (struct block));
-
-  BLOCK_START (bl) = 0;
-  BLOCK_END (bl) = 0;
-  BLOCK_FUNCTION (bl) = NULL;
-  BLOCK_SUPERBLOCK (bl) = NULL;
-  BLOCK_DICT (bl) = NULL;
-  BLOCK_NAMESPACE (bl) = NULL;
+  struct block *bl = OBSTACK_ZALLOC (obstack, struct block);
 
   return bl;
 }