From: Doug Evans Date: Sun, 26 Oct 2014 18:36:59 +0000 (-0700) Subject: block.c (allocate_block): Use OBSTACK_ZALLOC instead of obstack_alloc. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c35218eab6ed3b4c5ddd454809820f09030480f;p=binutils-gdb.git block.c (allocate_block): Use OBSTACK_ZALLOC instead of obstack_alloc. gdb/ChangeLog: * block.c (allocate_block): Use OBSTACK_ZALLOC instead of obstack_alloc. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fd417f787be..16c9ec83cf5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-10-26 Doug Evans + + * block.c (allocate_block): Use OBSTACK_ZALLOC instead of + obstack_alloc. + 2014-10-26 Doug Evans * parser-defs.h (block_found): Move decl from here ... diff --git a/gdb/block.c b/gdb/block.c index 4a31ea9a4b7..8d40c9d5931 100644 --- a/gdb/block.c +++ b/gdb/block.c @@ -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; }