diff options
author | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 14:45:42 +0100 |
---|---|---|
committer | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 15:07:12 +0100 |
commit | a1ffb40e32741f992c743e7b16c061fefa3747ac (patch) | |
tree | 246a29a87b26cfd5d07b17070f85eb3785018de9 /stdlib/strtod_l.c | |
parent | 1448f3244714a9dabb5240ec18b094f100887d5c (diff) | |
download | glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.xz glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip |
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'stdlib/strtod_l.c')
-rw-r--r-- | stdlib/strtod_l.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c index c80306deef..6707e482a4 100644 --- a/stdlib/strtod_l.c +++ b/stdlib/strtod_l.c @@ -545,7 +545,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) struct __locale_data *current = loc->__locales[LC_NUMERIC]; - if (__builtin_expect (group, 0)) + if (__glibc_unlikely (group)) { grouping = _NL_CURRENT (LC_NUMERIC, GROUPING); if (*grouping <= 0 || *grouping == CHAR_MAX) @@ -709,7 +709,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) while (c == L'0' || ((wint_t) thousands != L'\0' && c == (wint_t) thousands)) c = *++cp; #else - if (__builtin_expect (thousands == NULL, 1)) + if (__glibc_likely (thousands == NULL)) while (c == '0') c = *++cp; else @@ -789,7 +789,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) /* Not a digit or separator: end of the integer part. */ break; #else - if (__builtin_expect (thousands == NULL, 1)) + if (__glibc_likely (thousands == NULL)) break; else { @@ -1181,10 +1181,10 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) exponent -= incr; } - if (__builtin_expect (exponent > MAX_10_EXP + 1 - (intmax_t) int_no, 0)) + if (__glibc_unlikely (exponent > MAX_10_EXP + 1 - (intmax_t) int_no)) return overflow_value (negative); - if (__builtin_expect (exponent < MIN_10_EXP - (DIG + 1), 0)) + if (__glibc_unlikely (exponent < MIN_10_EXP - (DIG + 1))) return underflow_value (negative); if (int_no > 0) @@ -1245,7 +1245,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc) /* Now we know the exponent of the number in base two. Check it against the maximum possible exponent. */ - if (__builtin_expect (bits > MAX_EXP, 0)) + if (__glibc_unlikely (bits > MAX_EXP)) return overflow_value (negative); /* We have already the first BITS bits of the result. Together with |