guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] branch main updated: Fix brace style for bf9d30f3c3fd03c


From: Daniel Llorens
Subject: [Guile-commits] branch main updated: Fix brace style for bf9d30f3c3fd03cb37d604f1927e9ce5c699338b
Date: Fri, 05 Nov 2021 08:47:09 -0400

This is an automated email from the git hooks/post-receive script.

lloda pushed a commit to branch main
in repository guile.

The following commit(s) were added to refs/heads/main by this push:
     new 24116be  Fix brace style for bf9d30f3c3fd03cb37d604f1927e9ce5c699338b
24116be is described below

commit 24116be822c96741eacd667e4e3507300c596cba
Author: Daniel Llorens <lloda@sarc.name>
AuthorDate: Fri Nov 5 13:46:38 2021 +0100

    Fix brace style for bf9d30f3c3fd03cb37d604f1927e9ce5c699338b
---
 libguile/numbers.c | 48 ++++++++++++++++++++++++++----------------------
 1 file changed, 26 insertions(+), 22 deletions(-)

diff --git a/libguile/numbers.c b/libguile/numbers.c
index bb19a15..bc0fe28 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -5120,17 +5120,19 @@ SCM_DEFINE (scm_ash, "ash", 2, 0, 0,
       ? SCM_INUM0 : SCM_I_MAKINUM (-1);
   else if (scm_is_true (scm_zero_p (n)))
     return SCM_INUM0;
-  else if (scm_is_signed_integer (count, INT32_MIN + 1, INT32_MAX)) {
-    /* We exclude MIN to ensure that 'bits_to_shift' can be
-       negated without overflowing, if INT32_MIN happens to be LONG_MIN */
-    long bits_to_shift = scm_to_long (count);
-    if (bits_to_shift > 0)
-      return left_shift_exact_integer (n, bits_to_shift);
-    else if (SCM_LIKELY (bits_to_shift < 0))
-      return floor_right_shift_exact_integer (n, -bits_to_shift);
-    else
-      return n;
-  } else
+  else if (scm_is_signed_integer (count, INT32_MIN + 1, INT32_MAX))
+    {
+      /* We exclude MIN to ensure that 'bits_to_shift' can be
+         negated without overflowing, if INT32_MIN happens to be LONG_MIN */
+      long bits_to_shift = scm_to_long (count);
+      if (bits_to_shift > 0)
+        return left_shift_exact_integer (n, bits_to_shift);
+      else if (SCM_LIKELY (bits_to_shift < 0))
+        return floor_right_shift_exact_integer (n, -bits_to_shift);
+      else
+        return n;
+    }
+  else
     scm_num_overflow ("ash");
 }
 #undef FUNC_NAME
@@ -5166,17 +5168,19 @@ SCM_DEFINE (scm_round_ash, "round-ash", 2, 0, 0,
     /* If N is zero, or the right shift count exceeds the integer
        length, the result is zero. */
     return SCM_INUM0;
-  else if (scm_is_signed_integer (count, INT32_MIN + 1, INT32_MAX)) {
-    /* We exclude MIN to ensure that 'bits_to_shift' can be
-       negated without overflowing, if INT32_MIN happens to be LONG_MIN */
-    long bits_to_shift = scm_to_long (count);
-    if (bits_to_shift > 0)
-      return left_shift_exact_integer (n, bits_to_shift);
-    else if (SCM_LIKELY (bits_to_shift < 0))
-      return round_right_shift_exact_integer (n, -bits_to_shift);
-    else
-      return n;
-  } else 
+  else if (scm_is_signed_integer (count, INT32_MIN + 1, INT32_MAX))
+    {
+      /* We exclude MIN to ensure that 'bits_to_shift' can be
+         negated without overflowing, if INT32_MIN happens to be LONG_MIN */
+      long bits_to_shift = scm_to_long (count);
+      if (bits_to_shift > 0)
+        return left_shift_exact_integer (n, bits_to_shift);
+      else if (SCM_LIKELY (bits_to_shift < 0))
+        return round_right_shift_exact_integer (n, -bits_to_shift);
+      else
+        return n;
+    }
+  else 
     scm_num_overflow ("round-ash");
 }
 #undef FUNC_NAME



reply via email to

[Prev in Thread] Current Thread [Next in Thread]