From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 7E32D3858D20; Sun, 19 Feb 2023 23:37:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E32D3858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676849834; bh=592c1mgY7nR4biQMOcQ5fcMzVUDSDSOoKbHrnUlRPyo=; h=From:To:Subject:Date:From; b=cxGIvp1oDiesTa7NFyRZ5506/IbfnJMcpiR2qSAx2/j14jPv60eHmRHorU2XHqkwi g2LPAaTwcj9hXfnTkS1/NlrW1DeBtXYUcIC33mPNBFoOTTm+ZTfebdS7Ozn81gGWlq t2uRKsTLcwDMwe+lOA3KqKWNTgMm0JfuF3aDshV4= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Don't allow NULL as an argument to block_using X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 683aecac8c37c11d63203c96455a3d9ecf50bbe9 X-Git-Newrev: 392c1cbd745a575c5894ea33876f255b66a14d89 Message-Id: <20230219233714.7E32D3858D20@sourceware.org> Date: Sun, 19 Feb 2023 23:37:14 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D392c1cbd745a= 575c5894ea33876f255b66a14d89 commit 392c1cbd745a575c5894ea33876f255b66a14d89 Author: Tom Tromey Date: Thu Jan 19 17:13:22 2023 -0700 Don't allow NULL as an argument to block_using =20 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 =3D=3D NULL || block->namespace_info () =3D=3D NULL) + if (block->namespace_info () =3D=3D NULL) return NULL; else return block->namespace_info ()->using_decl;