From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 4CB203858034 for ; Tue, 2 Mar 2021 10:10:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4CB203858034 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6C645AAC5; Tue, 2 Mar 2021 10:10:11 +0000 (UTC) Date: Tue, 2 Mar 2021 11:10:09 +0100 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com, mark@klomp.org Subject: [PATCH] Remove dead code in function dwz Message-ID: <20210302101008.GA23079@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP 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: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 10:10:13 -0000 Hi, Function dwz contains this code: ... free (dso); if (ret == 0 && !low_mem) res->res = 0; ... The value of low_mem will always be false here. At that point, cleanup has been called, which resets multifile_mode back to 0. Fix this by removing the "&& !low_mem". Any comments? Thanks, - Tom Remove dead code in function dwz 2021-03-02 Tom de Vries * dwz.c (dwz): Remove dead code. --- dwz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwz.c b/dwz.c index d5fe7b1..1d7d815 100644 --- a/dwz.c +++ b/dwz.c @@ -15595,7 +15595,7 @@ dwz (const char *file, const char *outfile, struct file_result *res, close (fd); free (dso); - if (ret == 0 && !low_mem) + if (ret == 0) res->res = 0; if (ret == 3) {