From patchwork Wed Sep 29 16:26:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lu=C3=ADs_Ferreira?= X-Patchwork-Id: 45568 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 734C8385800A for ; Wed, 29 Sep 2021 16:28:37 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from 4.mo7.mail-out.ovh.net (4.mo7.mail-out.ovh.net [178.32.122.254]) by sourceware.org (Postfix) with ESMTPS id 4ED143858001 for ; Wed, 29 Sep 2021 16:26:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4ED143858001 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lsferreira.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lsferreira.net Received: from player791.ha.ovh.net (unknown [10.110.115.223]) by mo7.mail-out.ovh.net (Postfix) with ESMTP id ECF451BA260 for ; Wed, 29 Sep 2021 18:26:29 +0200 (CEST) Received: from lsferreira.net (252.131.62.94.rev.vodafone.pt [94.62.131.252]) (Authenticated sender: contact@lsferreira.net) by player791.ha.ovh.net (Postfix) with ESMTPSA id 14583229F8668; Wed, 29 Sep 2021 16:26:27 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-105G006ea789cd5-bde8-45e8-9e5d-842d500ac264, 2FC05558ACBD31F08628CC07958FA02A3D172E3F) smtp.auth=contact@lsferreira.net X-OVh-ClientIp: 94.62.131.252 From: =?utf-8?q?Lu=C3=ADs_Ferreira?= To: gcc-patches@gcc.gnu.org Subject: [PATCH] libiberty: d-demangle: remove parenthesis where it is not needed Date: Wed, 29 Sep 2021 17:26:21 +0100 Message-Id: <20210929162621.473786-1-contact@lsferreira.net> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Ovh-Tracer-Id: 10643413298505513208 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvtddrudekvddgleelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffufffkofggtgfgsehtkeertdertdejnecuhfhrohhmpefnuhovshcuhfgvrhhrvghirhgruceotghonhhtrggttheslhhsfhgvrhhrvghirhgrrdhnvghtqeenucggtffrrghtthgvrhhnpeelvddvtddtffdukeffffejtdfgkeegudelhfehveeuudejueegjeduueefgedukeenucfkpheptddrtddrtddrtddpleegrdeivddrudefuddrvdehvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrhejledurdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghonhhtrggttheslhhsfhgvrhhrvghirhgrrdhnvghtpdhrtghpthhtohepghgttgdqphgrthgthhgvshesghgttgdrghhnuhdrohhrgh X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Lu=C3=ADs_Ferreira?= Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Those parenthesis doesn't increase readability at all and this patch makes the source code a bit more consistent with the rest of the dereferencing assignments. Signed-off-by: Luís Ferreira --- libiberty/d-demangle.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c index 3adf7b562d1..a05e72d8efe 100644 --- a/libiberty/d-demangle.c +++ b/libiberty/d-demangle.c @@ -253,15 +253,15 @@ dlang_hexdigit (const char *mangled, char *ret) c = mangled[0]; if (!ISDIGIT (c)) - (*ret) = (c - (ISUPPER (c) ? 'A' : 'a') + 10); + *ret = (c - (ISUPPER (c) ? 'A' : 'a') + 10); else - (*ret) = (c - '0'); + *ret = c - '0'; c = mangled[1]; if (!ISDIGIT (c)) - (*ret) = (*ret << 4) | (c - (ISUPPER (c) ? 'A' : 'a') + 10); + *ret = (*ret << 4) | (c - (ISUPPER (c) ? 'A' : 'a') + 10); else - (*ret) = (*ret << 4) | (c - '0'); + *ret = (*ret << 4) | (c - '0'); mangled += 2; @@ -338,7 +338,7 @@ dlang_decode_backref (const char *mangled, long *ret) static const char * dlang_backref (const char *mangled, const char **ret, struct dlang_info *info) { - (*ret) = NULL; + *ret = NULL; if (mangled == NULL || *mangled != 'Q') return NULL; @@ -356,7 +356,7 @@ dlang_backref (const char *mangled, const char **ret, struct dlang_info *info) return NULL; /* Set the position of the back reference. */ - (*ret) = qpos - refpos; + *ret = qpos - refpos; return mangled; }