From nobody Fri Jul 07 20:01:33 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QyPRf24LYz4lgXr; Fri, 7 Jul 2023 20:01:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyPRf1ZVFz3x8H; Fri, 7 Jul 2023 20:01:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688760094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5abm/g988Tv+8zkvlzv3r2G/cd8Yh1Naaq/dm/BQ7/8=; b=VdXJ83j0G+C8EegqAy1GlqOg9B0rh9C1umIfECnsC9IH8kZv3zVB9btJzvd55E1bew9RME 97zZdxLD7VBVkpso1lYeXcXwHYVTqSa6gXpXOUZynzKFeRLGS+kalAcUIAghBuDdpaKwsK wuRU3T8nvdjM0WZhMRoDpUaERyZ+HJvIZwMWT4dXNnXQaIR0X0hWwk20SvIkCrT6Nc3/pA BcQ247EDbXXygDPo0m8n1o+8m5n3MES/2qxbaaH4jGkCN2GgCjF/FCaieCten6O5l3fIq8 T8gKi6UNit8hR9lah9+vr3Khtj0yn2caTrY8E1z7LSjaPqDmYDGOp2jTul67ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688760094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5abm/g988Tv+8zkvlzv3r2G/cd8Yh1Naaq/dm/BQ7/8=; b=d2Ly4N2DVYK4LxtewMv4XsII8eyeS2jWRYsu5/3ZteU7gx23ECf2DrxiW7GSePYJss1fCx ITQBgJ8W/MTyN6SvxLNjk1oBYFculb79fS9M8loyx5XNt9eD5R+5len/rGti/7FwnqnLq/ +S3m2Fg8R2aqx2M/cr6q+jpqTntdp8koLW9TKuZ4+R0NykhB7V5PU9jJ0AvCq6o5gpvztN UpaEpixPijF3Hs/+9r3bJbikfCrX0qmCbA1AkwM7WatHg1LjxPJwF1mzZA/eoRiqsxZuWK RlWnZKpbVrrcOgGw9+tvsjRlaR7Ym7QLr+dc/Xqc3vk4VFwV7j1syi5kFOMe+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688760094; a=rsa-sha256; cv=none; b=JSslNvG3jmCTmmzG7EFDCpqaFSiZ/a7bNVpJFOqGABnRhkInDGHbmXmcMsLmVPyI3Xqy3p 6TDB34tBufx29UnJHn0tYvDDRgtCiEBc7xI5tkCdj8hBkQmUCquQtxcdXB04vxFWq/HQQF c0PVvmRwoW8i5lZ6FBlDZ/O+eh4DmOVZAviii3OnI92uNQSH7MNzXh9uAUS1L+3afWQLP/ Aj9lqDPz5skrUOkPyprimOWdHaJ5RBwoqFyPKFKf9+A+SKxTMEWIN6wTDM1cJ1OzE9BQpT e7OyLXZiMLRAtSM/O3Gg7eLgOhRPD0YZGNegqVSNWwdxQDvSXmHuNJHuhMiFeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QyPRf0Lglzs02; Fri, 7 Jul 2023 20:01:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 367K1XG7024141; Fri, 7 Jul 2023 20:01:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 367K1XoU024140; Fri, 7 Jul 2023 20:01:33 GMT (envelope-from git) Date: Fri, 7 Jul 2023 20:01:33 GMT Message-Id: <202307072001.367K1XoU024140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9ac841e922da - main - divmoddi*: Use separate statements instead of the comma operator. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ac841e922da86d4259add8bf64467f693b4f8aa Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9ac841e922da86d4259add8bf64467f693b4f8aa commit 9ac841e922da86d4259add8bf64467f693b4f8aa Author: John Baldwin AuthorDate: 2023-07-07 20:01:19 +0000 Commit: John Baldwin CommitDate: 2023-07-07 20:01:19 +0000 divmoddi*: Use separate statements instead of the comma operator. Differential Revision: https://reviews.freebsd.org/D40835 --- sys/libkern/divdi3.c | 18 +++++++++++------- sys/libkern/divmoddi4.c | 20 +++++++++++++------- sys/libkern/moddi3.c | 11 +++++++---- 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/sys/libkern/divdi3.c b/sys/libkern/divdi3.c index 8e04a81abdba..5800388a8704 100644 --- a/sys/libkern/divdi3.c +++ b/sys/libkern/divdi3.c @@ -47,13 +47,17 @@ __divdi3(quad_t a, quad_t b) u_quad_t ua, ub, uq; int neg; - if (a < 0) - ua = -(u_quad_t)a, neg = 1; - else - ua = a, neg = 0; - if (b < 0) - ub = -(u_quad_t)b, neg ^= 1; - else + if (a < 0) { + ua = -(u_quad_t)a; + neg = 1; + } else { + ua = a; + neg = 0; + } + if (b < 0) { + ub = -(u_quad_t)b; + neg ^= 1; + } else ub = b; uq = __qdivrem(ua, ub, (u_quad_t *)0); return (neg ? -uq : uq); diff --git a/sys/libkern/divmoddi4.c b/sys/libkern/divmoddi4.c index af0013532882..67a95b82d24b 100644 --- a/sys/libkern/divmoddi4.c +++ b/sys/libkern/divmoddi4.c @@ -44,13 +44,19 @@ __divmoddi4(quad_t a, quad_t b, quad_t *rem) u_quad_t ua, ub, uq, urem; int negq, negr; - if (a < 0) - ua = -(u_quad_t)a, negq = 1, negr = 1; - else - ua = a, negq = 0, negr = 0; - if (b < 0) - ub = -(u_quad_t)b, negq ^= 1; - else + if (a < 0) { + ua = -(u_quad_t)a; + negq = 1; + negr = 1; + } else { + ua = a; + negq = 0; + negr = 0; + } + if (b < 0) { + ub = -(u_quad_t)b; + negq ^= 1; + } else ub = b; uq = __qdivrem(ua, ub, &urem); if (rem != 0) diff --git a/sys/libkern/moddi3.c b/sys/libkern/moddi3.c index 0dbff4bdce89..60c3a85bb6e7 100644 --- a/sys/libkern/moddi3.c +++ b/sys/libkern/moddi3.c @@ -47,10 +47,13 @@ __moddi3(quad_t a, quad_t b) u_quad_t ua, ub, ur; int neg; - if (a < 0) - ua = -(u_quad_t)a, neg = 1; - else - ua = a, neg = 0; + if (a < 0) { + ua = -(u_quad_t)a; + neg = 1; + } else { + ua = a; + neg = 0; + } if (b < 0) ub = -(u_quad_t)b; else