diff options
author | Doug Evans <xdje42@gmail.com> | 2014-10-26 11:36:59 -0700 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2014-10-26 11:36:59 -0700 |
commit | 4c35218eab6ed3b4c5ddd454809820f09030480f (patch) | |
tree | 57800c11fea0382e9f79bd4baa0b89fafcc0cca9 | |
parent | f08e8df3ab2f98b68c6cba6dc9ff5ae2ff3ecb6c (diff) | |
download | gdb-4c35218eab6ed3b4c5ddd454809820f09030480f.zip gdb-4c35218eab6ed3b4c5ddd454809820f09030480f.tar.gz gdb-4c35218eab6ed3b4c5ddd454809820f09030480f.tar.bz2 |
block.c (allocate_block): Use OBSTACK_ZALLOC instead of obstack_alloc.
gdb/ChangeLog:
* block.c (allocate_block): Use OBSTACK_ZALLOC instead of
obstack_alloc.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/block.c | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fd417f7..16c9ec8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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 ... * symtab.h (block_found): ... to here. diff --git a/gdb/block.c b/gdb/block.c index 4a31ea9..8d40c9d 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; } |