public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Don't allow NULL as an argument to block_using Date: Sun, 19 Feb 2023 23:37:14 +0000 (GMT) [thread overview] Message-ID: <20230219233714.7E32D3858D20@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=392c1cbd745a575c5894ea33876f255b66a14d89 commit 392c1cbd745a575c5894ea33876f255b66a14d89 Author: Tom Tromey <tom@tromey.com> Date: Thu Jan 19 17:13:22 2023 -0700 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. Diff: --- 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;
reply other threads:[~2023-02-19 23:37 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230219233714.7E32D3858D20@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).