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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user