From 47e11ddfe31a10c2d79d03e963df96e23a55a5c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kijewski?= <rene.kijewski@fu-berlin.de> Date: Fri, 14 Feb 2014 14:36:06 +0100 Subject: [PATCH] Split `} else {` lines per #693 --- sys/quad_math/ashldi3.c | 3 ++- sys/quad_math/ashrdi3.c | 3 ++- sys/quad_math/fixdfdi.c | 9 ++++++--- sys/quad_math/fixsfdi.c | 9 ++++++--- sys/quad_math/floatdidf.c | 3 ++- sys/quad_math/floatdisf.c | 3 ++- sys/quad_math/lshldi3.c | 3 ++- sys/quad_math/lshrdi3.c | 3 ++- sys/quad_math/muldi3.c | 24 ++++++++++++++++-------- sys/quad_math/qdivrem.c | 3 ++- 10 files changed, 42 insertions(+), 21 deletions(-) diff --git a/sys/quad_math/ashldi3.c b/sys/quad_math/ashldi3.c index d9e78bb453..3568722724 100644 --- a/sys/quad_math/ashldi3.c +++ b/sys/quad_math/ashldi3.c @@ -51,7 +51,8 @@ quad_t __ashldi3(quad_t a, qshift_t shift) if (shift >= INT_BITS) { aa.ul[H] = aa.ul[L] << (shift - INT_BITS); aa.ul[L] = 0; - } else { + } + else { aa.ul[H] = (aa.ul[H] << shift) | (aa.ul[L] >> (INT_BITS - shift)); aa.ul[L] <<= shift; } diff --git a/sys/quad_math/ashrdi3.c b/sys/quad_math/ashrdi3.c index f74991cd05..09ad679d21 100644 --- a/sys/quad_math/ashrdi3.c +++ b/sys/quad_math/ashrdi3.c @@ -60,7 +60,8 @@ quad_t __ashrdi3(quad_t a, qshift_t shift) /* LINTED inherits machine dependency*/ aa.ul[L] = aa.sl[H] >> (shift - INT_BITS); aa.ul[H] = s; - } else { + } + else { aa.ul[L] = (aa.ul[L] >> shift) | (aa.ul[H] << (INT_BITS - shift)); /* LINTED inherits machine dependency */ aa.sl[H] >>= shift; diff --git a/sys/quad_math/fixdfdi.c b/sys/quad_math/fixdfdi.c index 799547108e..9689976aa1 100644 --- a/sys/quad_math/fixdfdi.c +++ b/sys/quad_math/fixdfdi.c @@ -43,13 +43,16 @@ quad_t __fixdfdi(double x) if (x < 0) { if (x <= QUAD_MIN) { return QUAD_MIN; - } else { + } + else { return (quad_t) -(u_quad_t) -x; } - } else { + } + else { if (x >= QUAD_MAX) { return QUAD_MAX; - } else { + } + else { return (quad_t) (u_quad_t) x; } } diff --git a/sys/quad_math/fixsfdi.c b/sys/quad_math/fixsfdi.c index d7d006eaf5..c141d57ba7 100644 --- a/sys/quad_math/fixsfdi.c +++ b/sys/quad_math/fixsfdi.c @@ -45,13 +45,16 @@ quad_t __fixsfdi(float x) if (x < 0) { if (x <= QUAD_MIN) { return QUAD_MIN; - } else { + } + else { return (quad_t) -(u_quad_t) -x; } - } else { + } + else { if (x >= QUAD_MAX) { return QUAD_MAX; - } else { + } + else { return (quad_t) (u_quad_t) x; } } diff --git a/sys/quad_math/floatdidf.c b/sys/quad_math/floatdidf.c index 0b0aaf02a8..7d0e3f920f 100644 --- a/sys/quad_math/floatdidf.c +++ b/sys/quad_math/floatdidf.c @@ -49,7 +49,8 @@ double __floatdidf(quad_t x) if (x < 0) { u.q = -x; neg = 1; - } else { + } + else { u.q = x; neg = 0; } diff --git a/sys/quad_math/floatdisf.c b/sys/quad_math/floatdisf.c index 2d9c3f8ea4..c387e6169a 100644 --- a/sys/quad_math/floatdisf.c +++ b/sys/quad_math/floatdisf.c @@ -49,7 +49,8 @@ float __floatdisf(quad_t x) if (x < 0) { u.q = -x; neg = 1; - } else { + } + else { u.q = x; neg = 0; } diff --git a/sys/quad_math/lshldi3.c b/sys/quad_math/lshldi3.c index 6afb6125a3..b919388e70 100644 --- a/sys/quad_math/lshldi3.c +++ b/sys/quad_math/lshldi3.c @@ -51,7 +51,8 @@ quad_t __lshldi3(quad_t a, qshift_t shift) if (shift >= INT_BITS) { aa.ul[H] = aa.ul[L] << (shift - INT_BITS); aa.ul[L] = 0; - } else { + } + else { aa.ul[H] = (aa.ul[H] << shift) | (aa.ul[L] >> (INT_BITS - shift)); aa.ul[L] <<= shift; } diff --git a/sys/quad_math/lshrdi3.c b/sys/quad_math/lshrdi3.c index e2a5c3f0ad..ee47140e56 100644 --- a/sys/quad_math/lshrdi3.c +++ b/sys/quad_math/lshrdi3.c @@ -50,7 +50,8 @@ quad_t __lshrdi3(quad_t a, qshift_t shift) if (shift >= INT_BITS) { aa.ul[L] = aa.ul[H] >> (shift - INT_BITS); aa.ul[H] = 0; - } else { + } + else { aa.ul[L] = (aa.ul[L] >> shift) | (aa.ul[H] << (INT_BITS - shift)); aa.ul[H] >>= shift; } diff --git a/sys/quad_math/muldi3.c b/sys/quad_math/muldi3.c index 9d616113d2..61b781ca52 100644 --- a/sys/quad_math/muldi3.c +++ b/sys/quad_math/muldi3.c @@ -110,13 +110,15 @@ quad_t __muldi3(quad_t a, quad_t b) */ if (a >= 0) { u.q = a, negall = 0; - } else { + } + else { u.q = -a, negall = 1; } if (b >= 0) { v.q = b; - } else { + } + else { v.q = -b, negall ^= 1; } @@ -127,7 +129,8 @@ quad_t __muldi3(quad_t a, quad_t b) * are small. Here the product is just u0*v0. */ prod.q = __lmulq(u0, v0); - } else { + } + else { /* * Compute the three intermediate products, remembering * whether the middle term is negative. We can discard @@ -138,13 +141,15 @@ quad_t __muldi3(quad_t a, quad_t b) if (u1 >= u0) { negmid = 0, udiff = u1 - u0; - } else { + } + else { negmid = 1, udiff = u0 - u1; } if (v0 >= v1) { vdiff = v0 - v1; - } else { + } + else { vdiff = v1 - v0, negmid ^= 1; } @@ -204,13 +209,15 @@ static quad_t __lmulq(u_int u, u_int v) if (u1 >= u0) { udiff = u1 - u0, neg = 0; - } else { + } + else { udiff = u0 - u1, neg = 1; } if (v0 >= v1) { vdiff = v0 - v1; - } else { + } + else { vdiff = v1 - v0, neg ^= 1; } @@ -227,7 +234,8 @@ static quad_t __lmulq(u_int u, u_int v) was = prodl; prodl -= LHUP(mid); prodh -= HHALF(mid) + (prodl > was); - } else { + } + else { was = prodl; prodl += LHUP(mid); prodh += HHALF(mid) + (prodl < was); diff --git a/sys/quad_math/qdivrem.c b/sys/quad_math/qdivrem.c index 21de613d65..9ef434b991 100644 --- a/sys/quad_math/qdivrem.c +++ b/sys/quad_math/qdivrem.c @@ -214,7 +214,8 @@ __qdivrem(u_quad_t uq, u_quad_t vq, u_quad_t *arq) qhat = B; rhat = uj1; goto qhat_too_big; - } else { + } + else { u_int nn = COMBINE(uj0, uj1); qhat = nn / v1; rhat = nn % v1; -- GitLab