mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Use glibc_likely instead __builtin_expect.
This commit is contained in:
@ -40,7 +40,7 @@ __get_clockfreq (void)
|
||||
return result;
|
||||
|
||||
fd = __open ("/proc/cpuinfo", O_RDONLY);
|
||||
if (__builtin_expect (fd != -1, 1))
|
||||
if (__glibc_likely (fd != -1))
|
||||
{
|
||||
/* XXX AFAIK the /proc filesystem can generate "files" only up
|
||||
to a size of 4096 bytes. */
|
||||
@ -52,7 +52,7 @@ __get_clockfreq (void)
|
||||
{
|
||||
char *mhz = memmem (buf, n, "cpu MHz", 7);
|
||||
|
||||
if (__builtin_expect (mhz != NULL, 1))
|
||||
if (__glibc_likely (mhz != NULL))
|
||||
{
|
||||
char *endp = buf + n;
|
||||
int seen_decpoint = 0;
|
||||
|
Reference in New Issue
Block a user