public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Tom de Vries <tdevries@suse.de>
Cc: dwz@sourceware.org, jakub@redhat.com
Subject: Re: [PATCH] Remove dead code in function dwz
Date: Wed, 3 Mar 2021 23:14:15 +0100	[thread overview]
Message-ID: <20210303221415.GI3014@wildebeest.org> (raw)
In-Reply-To: <20210302101008.GA23079@delia>

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

      reply	other threads:[~2021-03-03 22:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 10:10 Tom de Vries
2021-03-03 22:14 ` Mark Wielaard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210303221415.GI3014@wildebeest.org \
    --to=mark@klomp.org \
    --cc=dwz@sourceware.org \
    --cc=jakub@redhat.com \
    --cc=tdevries@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).