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

gdb/ChangeLog:

	* block.c (allocate_block): Use OBSTACK_ZALLOC instead of
	obstack_alloc.
This commit is contained in:
Doug Evans 2014-10-26 11:36:59 -07:00
parent f08e8df3ab
commit 4c35218eab
2 changed files with 6 additions and 8 deletions

View 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 ...

View 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;
}