summaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/strfmon_l.c16
-rw-r--r--stdlib/strtod_l.c25
-rw-r--r--stdlib/tst-strfrom.h8
3 files changed, 25 insertions, 24 deletions
diff --git a/stdlib/strfmon_l.c b/stdlib/strfmon_l.c
index cac9d6dd72..3a3c3d0718 100644
--- a/stdlib/strfmon_l.c
+++ b/stdlib/strfmon_l.c
@@ -386,17 +386,17 @@ __vstrfmon_l_internal (char *s, size_t maxsize, locale_t loc,
/* Check for degenerate cases */
if (sep_by_space == 2)
{
- if (sign_posn == 0 ||
- (sign_posn == 1 && !cs_precedes) ||
- (sign_posn == 2 && cs_precedes))
+ if (sign_posn == 0
+ || (sign_posn == 1 && !cs_precedes)
+ || (sign_posn == 2 && cs_precedes))
/* sign and symbol are not adjacent, so no separator */
sep_by_space = 0;
}
if (other_sep_by_space == 2)
{
- if (other_sign_posn == 0 ||
- (other_sign_posn == 1 && !other_cs_precedes) ||
- (other_sign_posn == 2 && other_cs_precedes))
+ if (other_sign_posn == 0
+ || (other_sign_posn == 1 && !other_cs_precedes)
+ || (other_sign_posn == 2 && other_cs_precedes))
/* sign and symbol are not adjacent, so no separator */
other_sep_by_space = 0;
}
@@ -444,8 +444,8 @@ __vstrfmon_l_internal (char *s, size_t maxsize, locale_t loc,
++other_left_bytes;
else if (other_sign_posn == 1)
other_left_bytes += strlen (other_sign_string);
- else if (other_cs_precedes &&
- (other_sign_posn == 3 || other_sign_posn == 4))
+ else if (other_cs_precedes
+ && (other_sign_posn == 3 || other_sign_posn == 4))
other_left_bytes += strlen (other_sign_string);
/* Compare the number of bytes preceding the value for
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index ccd56d0c6f..9bef59892a 100644
--- a/stdlib/strtod_l.c
+++ b/stdlib/strtod_l.c
@@ -280,11 +280,12 @@ round_and_return (mp_limb_t *retval, intmax_t exponent, int negative,
mp_limb_t cy = __mpn_add_1 (retval_normal, retval,
RETURN_LIMB_SIZE, 1);
- if (((MANT_DIG % BITS_PER_MP_LIMB) == 0 && cy) ||
- ((MANT_DIG % BITS_PER_MP_LIMB) != 0 &&
- ((retval_normal[RETURN_LIMB_SIZE - 1]
- & (((mp_limb_t) 1) << (MANT_DIG % BITS_PER_MP_LIMB)))
- != 0)))
+ if (((MANT_DIG % BITS_PER_MP_LIMB) == 0 && cy)
+ || ((MANT_DIG % BITS_PER_MP_LIMB) != 0
+ && ((retval_normal[RETURN_LIMB_SIZE - 1]
+ & (((mp_limb_t) 1)
+ << (MANT_DIG % BITS_PER_MP_LIMB)))
+ != 0)))
is_tiny = false;
}
}
@@ -325,10 +326,10 @@ round_and_return (mp_limb_t *retval, intmax_t exponent, int negative,
{
mp_limb_t cy = __mpn_add_1 (retval, retval, RETURN_LIMB_SIZE, 1);
- if (((MANT_DIG % BITS_PER_MP_LIMB) == 0 && cy) ||
- ((MANT_DIG % BITS_PER_MP_LIMB) != 0 &&
- (retval[RETURN_LIMB_SIZE - 1]
- & (((mp_limb_t) 1) << (MANT_DIG % BITS_PER_MP_LIMB))) != 0))
+ if (((MANT_DIG % BITS_PER_MP_LIMB) == 0 && cy)
+ || ((MANT_DIG % BITS_PER_MP_LIMB) != 0
+ && (retval[RETURN_LIMB_SIZE - 1]
+ & (((mp_limb_t) 1) << (MANT_DIG % BITS_PER_MP_LIMB))) != 0))
{
++exponent;
(void) __mpn_rshift (retval, retval, RETURN_LIMB_SIZE, 1);
@@ -861,9 +862,9 @@ ____STRTOF_INTERNAL (const STRING_TYPE *nptr, STRING_TYPE **endptr, int group,
{
cp += decimal_len;
c = *cp;
- while ((c >= L_('0') && c <= L_('9')) ||
- (base == 16 && ({ CHAR_TYPE lo = TOLOWER (c);
- lo >= L_('a') && lo <= L_('f'); })))
+ while ((c >= L_('0') && c <= L_('9'))
+ || (base == 16 && ({ CHAR_TYPE lo = TOLOWER (c);
+ lo >= L_('a') && lo <= L_('f'); })))
{
if (c != L_('0') && lead_zero == (size_t) -1)
lead_zero = dig_no - int_no;
diff --git a/stdlib/tst-strfrom.h b/stdlib/tst-strfrom.h
index f6b626611d..2e447f11af 100644
--- a/stdlib/tst-strfrom.h
+++ b/stdlib/tst-strfrom.h
@@ -103,10 +103,10 @@ test_ ## FSUF (void) \
for (i = 0; i < sizeof (htest) / sizeof (htest[0]); i++) \
{ \
rc = FTOSTR (buf, 50, htest[i].fmt, htest[i].t.FSUF); \
- if (strcmp (buf, htest[i].exp[0]) == 0 || \
- strcmp (buf, htest[i].exp[1]) == 0 || \
- strcmp (buf, htest[i].exp[2]) == 0 || \
- strcmp (buf, htest[i].exp[3]) == 0) \
+ if (strcmp (buf, htest[i].exp[0]) == 0 \
+ || strcmp (buf, htest[i].exp[1]) == 0 \
+ || strcmp (buf, htest[i].exp[2]) == 0 \
+ || strcmp (buf, htest[i].exp[3]) == 0) \
continue; \
else \
{ \