From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 653D33857404; Mon, 21 Mar 2022 19:21:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 653D33857404 From: "woodard at redhat dot com" To: libabigail@sourceware.org Subject: [Bug default/28976] Optionally ignore SONAME when comparing libraries Date: Mon, 21 Mar 2022 19:21:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: woodard at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: woodard at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2022 19:21:19 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28976 --- Comment #3 from Ben Woodard --- (In reply to Matthias Maennich from comment #2) > The hunk >=20 > + if(ctxt->show_soname_change()) > + r->priv_->sonames_equal_ =3D f->get_soname() =3D=3D s->get_soname(); > + else > + r->priv_->sonames_equal_ =3D true; >=20 > can be written as >=20 > + r->priv_->sonames_equal_ =3D ! ctxt->show_soname_change()=20 > || f->get_soname() =3D=3D s->get_soname(); That is clever. It might just be me but I find my version easier to read an= d 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 a= nd so even if it isn't -- oh well. I also considered: r->priv_->sonames_equal_ =3D ctxt->show_soname_change() ? f->get_soname() = =3D=3D s->get_soname() : true; and yours is a more compact form of that. --=20 You are receiving this mail because: You are on the CC list for the bug.=