]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix sense of a test in the static-linking version of ppc get_clockfreq
authorStan Shebs <stanshebs@google.com>
Fri, 17 May 2019 19:25:19 +0000 (12:25 -0700)
committerFangrui Song <i@maskray.me>
Sat, 28 Aug 2021 00:26:02 +0000 (17:26 -0700)
sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c

index 8821218ece9e5e14cf55b8e62a51f25b2318cf4a..4e4c2a2262d2277b43e8432009ed588856b74083 100644 (file)
@@ -59,7 +59,7 @@ __get_clockfreq (void)
      timebase        : 33333333
      We search for this line and convert the number into an integer.  */
   int fd = __open_nocancel ("/proc/cpuinfo", O_RDONLY);
-  if (__glibc_likely (fd != -1))
+  if (__glibc_unlikely (fd == -1))
     return result;
 
   /* The timebase will be in the 1st 1024 bytes for systems with up