From patchwork Wed Nov 11 17:29:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1398440 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=sourceware.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=l0QQ48SQ; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CWWv45Rjwz9sRK for ; Thu, 12 Nov 2020 04:29:36 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7C8FD3988806; Wed, 11 Nov 2020 17:29:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C8FD3988806 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1605115769; bh=8Lkcthi5meWSNJ/xfN2/UKT/NmgNI4T3OpdcHHkWjJQ=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=l0QQ48SQGSBJGFh4bvypg7gYz86hCKGjc0ZbZd0+Ja1kjchrCHRjX8plfaeVQ0wLe ajLDtbqUKO7/yIeBC3XXvuPb4JPW7NBJvkhNneYR5G1DwY80S/wvs8eb0S/tTAfA5x DGmYBeeuCF7tFZ1qEEFbEQKioZE2ThXtv7OG/BNM= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from quail.birch.relay.mailchannels.net (quail.birch.relay.mailchannels.net [23.83.209.151]) by sourceware.org (Postfix) with ESMTPS id 1C5AD3864877 for ; Wed, 11 Nov 2020 17:29:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1C5AD3864877 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C3AB436141D for ; Wed, 11 Nov 2020 17:29:25 +0000 (UTC) Received: from pdx1-sub0-mail-a21.g.dreamhost.com (100-96-227-237.trex.outbound.svc.cluster.local [100.96.227.237]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 1F5AE361127 for ; Wed, 11 Nov 2020 17:29:25 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a21.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.10); Wed, 11 Nov 2020 17:29:25 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Reaction-Eight: 195f85bb00480bf7_1605115765351_722999702 X-MC-Loop-Signature: 1605115765351:677042673 X-MC-Ingress-Time: 1605115765350 Received: from pdx1-sub0-mail-a21.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a21.g.dreamhost.com (Postfix) with ESMTP id A10B37F0E8 for ; Wed, 11 Nov 2020 09:29:24 -0800 (PST) Received: from rhbox.redhat.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a21.g.dreamhost.com (Postfix) with ESMTPSA id 8A6FB7F019 for ; Wed, 11 Nov 2020 09:29:22 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a21 To: libc-alpha@sourceware.org Subject: [PATCH] tests: Remove NULL check for an array Date: Wed, 11 Nov 2020 22:59:13 +0530 Message-Id: <20201111172913.890166-1-siddhesh@sourceware.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP, UNWANTED_LANGUAGE_BODY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" The NULL check for an array on stack is pointless since it will always be false, so drop it. --- This is fairly obvious, so I'll commit it in a day if nobody objects. Siddhesh stdio-common/scanf14.c | 2 -- stdio-common/scanf15.c | 2 -- stdio-common/scanf16.c | 2 -- stdio-common/scanf17.c | 2 -- 4 files changed, 8 deletions(-) diff --git a/stdio-common/scanf14.c b/stdio-common/scanf14.c index f92838edd2..4c2feea7ba 100644 --- a/stdio-common/scanf14.c +++ b/stdio-common/scanf14.c @@ -86,8 +86,6 @@ main (void) char fname[strlen (tmpdir) + sizeof "/tst-scanf14.XXXXXX"]; sprintf (fname, "%s/tst-scanf14.XXXXXX", tmpdir); - if (fname == NULL) - FAIL (); /* Create a temporary file. */ int fd = mkstemp (fname); diff --git a/stdio-common/scanf15.c b/stdio-common/scanf15.c index a937815b14..6e4980c2e1 100644 --- a/stdio-common/scanf15.c +++ b/stdio-common/scanf15.c @@ -69,8 +69,6 @@ main (void) char fname[strlen (tmpdir) + sizeof "/tst-scanf15.XXXXXX"]; sprintf (fname, "%s/tst-scanf15.XXXXXX", tmpdir); - if (fname == NULL) - FAIL (); /* Create a temporary file. */ int fd = mkstemp (fname); diff --git a/stdio-common/scanf16.c b/stdio-common/scanf16.c index b4ba3e6fe3..073a77efbe 100644 --- a/stdio-common/scanf16.c +++ b/stdio-common/scanf16.c @@ -117,8 +117,6 @@ main (void) char fname[strlen (tmpdir) + sizeof "/tst-scanf16.XXXXXX"]; sprintf (fname, "%s/tst-scanf16.XXXXXX", tmpdir); - if (fname == NULL) - FAIL (); /* Create a temporary file. */ int fd = mkstemp (fname); diff --git a/stdio-common/scanf17.c b/stdio-common/scanf17.c index 428f22e45c..3224573733 100644 --- a/stdio-common/scanf17.c +++ b/stdio-common/scanf17.c @@ -100,8 +100,6 @@ main (void) char fname[strlen (tmpdir) + sizeof "/tst-scanf17.XXXXXX"]; sprintf (fname, "%s/tst-scanf17.XXXXXX", tmpdir); - if (fname == NULL) - FAIL (); /* Create a temporary file. */ int fd = mkstemp (fname);