1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

Use glibc_likely instead __builtin_expect.

This commit is contained in:
Ondřej Bílka
2014-02-10 14:45:42 +01:00
parent 1448f32447
commit a1ffb40e32
466 changed files with 2224 additions and 1655 deletions

View File

@@ -1094,7 +1094,7 @@ ___printf_fp (FILE *fp,
/* Write the exponent if it is needed. */
if (type != 'f')
{
if (__builtin_expect (expsign != 0 && exponent == 4 && spec == 'g', 0))
if (__glibc_unlikely (expsign != 0 && exponent == 4 && spec == 'g'))
{
/* This is another special case. The exponent of the number is
really smaller than -4, which requires the 'e'/'E' format.
@@ -1180,7 +1180,7 @@ ___printf_fp (FILE *fp,
size_t nbuffer = (2 + chars_needed * factor + decimal_len
+ ngroups * thousands_sep_len);
if (__builtin_expect (buffer_malloced, 0))
if (__glibc_unlikely (buffer_malloced))
{
buffer = (char *) malloc (nbuffer);
if (buffer == NULL)
@@ -1208,7 +1208,7 @@ ___printf_fp (FILE *fp,
}
tmpptr = buffer;
if (__builtin_expect (info->i18n, 0))
if (__glibc_unlikely (info->i18n))
{
#ifdef COMPILE_WPRINTF
wstartp = _i18n_number_rewrite (wstartp, wcp,
@@ -1228,7 +1228,7 @@ ___printf_fp (FILE *fp,
PRINT (tmpptr, wstartp, wide ? wcp - wstartp : cp - tmpptr);
/* Free the memory if necessary. */
if (__builtin_expect (buffer_malloced, 0))
if (__glibc_unlikely (buffer_malloced))
{
free (buffer);
free (wbuffer);