1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-30 06:50:31 +02:00

Fix brace style for bf9d30f3c3

This commit is contained in:
Daniel Llorens 2021-11-05 13:46:38 +01:00
parent c6b1171c6b
commit 24116be822

View file

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