projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
683aeca
)
Don't allow NULL as an argument to block_using
author
Tom Tromey
<tom@tromey.com>
Fri, 20 Jan 2023 00:13:22 +0000
(17:13 -0700)
committer
Tom Tromey
<tom@tromey.com>
Sun, 19 Feb 2023 19:51:05 +0000
(12:51 -0700)
block_using has special behavior when the block is NULL.
Remove this. No caller seems to be affected.
gdb/block.c
patch
|
blob
|
history
diff --git
a/gdb/block.c
b/gdb/block.c
index f24a2b5d0848f154266c8279f67fec5c81c65119..97a0214e0370b3a9b64174b690148338cd67867d 100644
(file)
--- 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;