public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "woodard at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/28976] Optionally ignore SONAME when comparing libraries
Date: Mon, 21 Mar 2022 19:21:19 +0000	[thread overview]
Message-ID: <bug-28976-9487-yEjrSHYFyf@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28976-9487@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28976

--- Comment #3 from Ben Woodard <woodard at redhat dot com> ---
(In reply to Matthias Maennich from comment #2)
> The hunk
> 
> +  if(ctxt->show_soname_change())
> +    r->priv_->sonames_equal_ = f->get_soname() == s->get_soname();
> +  else
> +    r->priv_->sonames_equal_ = true;
> 
> can be written as
> 
> + r->priv_->sonames_equal_ = ! ctxt->show_soname_change() 
>                             || f->get_soname() == s->get_soname();

That is clever. It might just be me but I find my version easier to read and I
doubt with optimization that the resulting machine code is going to be much
different. We should only be passing through this code once per execution and
so even if it isn't -- oh well.

I also considered:

r->priv_->sonames_equal_ = ctxt->show_soname_change() ? f->get_soname() ==
s->get_soname() : true;

and yours is a more compact form of that.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-03-21 19:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-17 22:01 [Bug default/28976] New: " woodard at redhat dot com
2022-03-17 22:02 ` [Bug default/28976] " woodard at redhat dot com
2022-03-21 14:59 ` woodard at redhat dot com
2022-03-21 15:04 ` maennich at android dot com
2022-03-21 19:21 ` woodard at redhat dot com [this message]
2022-03-31 21:33 ` woodard at redhat dot com
2022-06-28 22:28 ` woodard at redhat dot com

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=bug-28976-9487-yEjrSHYFyf@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=libabigail@sourceware.org \
    /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).