mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
Don't allow NULL as an argument to block_global_block
block_global_block has special behavior when the block is NULL. Remove this and patch up the callers instead.
This commit is contained in:
@@ -378,15 +378,11 @@ block_static_block (const struct block *block)
|
||||
return block;
|
||||
}
|
||||
|
||||
/* Return the static block associated to BLOCK. Return NULL if block
|
||||
is NULL. */
|
||||
/* Return the static block associated to BLOCK. */
|
||||
|
||||
const struct block *
|
||||
block_global_block (const struct block *block)
|
||||
{
|
||||
if (block == NULL)
|
||||
return NULL;
|
||||
|
||||
while (block->superblock () != NULL)
|
||||
block = block->superblock ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user