Don't allow NULL as an argument to block_using

block_using has special behavior when the block is NULL.
Remove this.  No caller seems to be affected.
This commit is contained in:
Tom Tromey
2023-01-19 17:13:22 -07:00
parent 683aecac8c
commit 392c1cbd74

View File

@@ -337,7 +337,7 @@ block_set_scope (struct block *block, const char *scope,
struct using_direct *
block_using (const struct block *block)
{
if (block == NULL || block->namespace_info () == NULL)
if (block->namespace_info () == NULL)
return NULL;
else
return block->namespace_info ()->using_decl;