From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id D3809385F028 for ; Wed, 3 Mar 2021 22:15:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D3809385F028 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from librem (deer0x15.wildebeest.org [172.31.17.151]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id B04CC304319B; Wed, 3 Mar 2021 23:15:29 +0100 (CET) Received: by librem (Postfix, from userid 1000) id D3FDFC065B; Wed, 3 Mar 2021 23:14:15 +0100 (CET) Date: Wed, 3 Mar 2021 23:14:15 +0100 From: Mark Wielaard To: Tom de Vries Cc: dwz@sourceware.org, jakub@redhat.com Subject: Re: [PATCH] Remove dead code in function dwz Message-ID: <20210303221415.GI3014@wildebeest.org> References: <20210302101008.GA23079@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210302101008.GA23079@delia> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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: Wed, 03 Mar 2021 22:15:39 -0000 Hi Tom, On Tue, Mar 02, 2021 at 11:10:09AM +0100, Tom de Vries wrote: > 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? You are right.when we get here cleanup () has been called and resets multifile_mode to zero. low_mem is defined as (multifile_mode & MULTIFILE_MODE_LOW_MEM) . So at this point low_mem is always false. I don't know why this condition was there to begin with. It seems it never was correct. So I agree that removing it seems like a good thing. Thanks, Mark