From 392c1cbd745a575c5894ea33876f255b66a14d89 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 19 Jan 2023 17:13:22 -0700 Subject: [PATCH] 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. --- gdb/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/block.c b/gdb/block.c index f24a2b5d084..97a0214e037 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; -- 2.30.2