From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id A652A3858CDA for ; Fri, 10 Mar 2023 14:55:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A652A3858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678460157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ioh5OAVLr8e1z8vw5L+Wu00tynnGD5O71/9qSHjD+Jg=; b=flJQ2OkwxvK3MjViKEs2nkDp+OMkDEt43qFhuzJGgh4QfD0tuwhMPQKOMYeLfszK6oZc6d 8h35xUpZGl2I9iPjmJ8tUhWHXcbvKO8HlE1GzQp32geJaLhDpIfwDUQpTas1d3PNHJmDTi JUd9Wm3l4B7BEqPPDXTAAss2y3tnH6o= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-138-qceXRVyANYKQJc_uY4xzDw-1; Fri, 10 Mar 2023 09:55:56 -0500 X-MC-Unique: qceXRVyANYKQJc_uY4xzDw-1 Received: by mail-wr1-f69.google.com with SMTP id m10-20020adfe94a000000b002cdc5eac0d0so1111289wrn.2 for ; Fri, 10 Mar 2023 06:55:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678460154; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ioh5OAVLr8e1z8vw5L+Wu00tynnGD5O71/9qSHjD+Jg=; b=ZG285R+aREZGWSGGgFfT7Q6iqVHn7jrF/H25jGm0vEXPrwjLGNtKf8XDXYz7vFctoe cDwfOUqhdebmgu73EWiwvZ3D4AbfSi6sSNi7r1xCONhvdvErwMuZd5HNE+1KRTGijK2b fvBL7jqsP832HG2vkaHY/ps7mLogeIEWMY09ODp4txrnmD/jNa1KH9l34W3AIKGdegtc UJnApF3rywjUhfOWr/RgQuzylpM4CqYe+hmxuvd+VjsqBtBbUocd5X1nX+Rmrb9QIqzc ZOLmm4z70PPX626sCnMrI0GkcBz1BhCkReSy5yf1NUhBmt1dluBmRmrsWO/tRAvAbHo2 1ulg== X-Gm-Message-State: AO0yUKXCPYEVGE1LU42jVVDMcCYWJVhLR6atSPot3mDhTJ8tzwJay7NR K2Ln4IHVaNwm/3k1UrkQKsE/Kth5Fx5GgnOlWgP0bzmbJzQn2D2wr5vWrq05IhPZuou0rtqqAZ9 SNfCc8okASEmbQvqSIF69b2GD2kAURbcYK1FiA35k7eGH3txmus+mN7QYkuUP0qJ29nJGparsy7 19NcsXcw== X-Received: by 2002:a05:600c:2150:b0:3e2:22f9:c4b9 with SMTP id v16-20020a05600c215000b003e222f9c4b9mr1600016wml.4.1678460154783; Fri, 10 Mar 2023 06:55:54 -0800 (PST) X-Google-Smtp-Source: AK7set/nrMecNX+ZYVravkiMEVqVEssvbDYDNdeY4VCG+7cgt5dDUWhBpPZyoIPG8aeEhkd6oZhhSw== X-Received: by 2002:a05:600c:2150:b0:3e2:22f9:c4b9 with SMTP id v16-20020a05600c215000b003e222f9c4b9mr1599997wml.4.1678460154483; Fri, 10 Mar 2023 06:55:54 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id p25-20020a05600c205900b003eaf666cbe0sm114871wmg.27.2023.03.10.06.55.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 06:55:54 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 03/10] gdb/python: remove unneeded nullptr check in frapy_block Date: Fri, 10 Mar 2023 14:55:20 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Spotted a redundant nullptr check in python/py-frame.c in the function frapy_block. This was introduced in commit 57126e4a45e3000e when we expanded an earlier check in return early if the pointer in question is nullptr. There should be no user visible changes after this commit. --- gdb/python/py-frame.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c index ecd55d2e568..00cd4bee492 100644 --- a/gdb/python/py-frame.c +++ b/gdb/python/py-frame.c @@ -304,13 +304,7 @@ frapy_block (PyObject *self, PyObject *args) return NULL; } - if (block) - { - return block_to_block_object - (block, fn_block->function ()->objfile ()); - } - - Py_RETURN_NONE; + return block_to_block_object (block, fn_block->function ()->objfile ()); } -- 2.25.4