aboutsummaryrefslogtreecommitdiff
path: root/gdb/block.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-19 17:13:22 -0700
committerTom Tromey <tom@tromey.com>2023-02-19 12:51:05 -0700
commit392c1cbd745a575c5894ea33876f255b66a14d89 (patch)
tree161676a34fd795aeed38d1ebc2758fb891b9e5d2 /gdb/block.c
parent683aecac8c37c11d63203c96455a3d9ecf50bbe9 (diff)
downloadgdb-392c1cbd745a575c5894ea33876f255b66a14d89.zip
gdb-392c1cbd745a575c5894ea33876f255b66a14d89.tar.gz
gdb-392c1cbd745a575c5894ea33876f255b66a14d89.tar.bz2
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.
Diffstat (limited to 'gdb/block.c')
-rw-r--r--gdb/block.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/block.c b/gdb/block.c
index f24a2b5..97a0214 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -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;