This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [glibc/google/grte/v5-2.27/master] Fix sense of a test in the static-linking version of ppc get_clockfreq
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Stan Shebs <stanshebs at google dot com>, GNU C Library <libc-alpha at sourceware dot org>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Date: Fri, 17 May 2019 23:35:22 -0500
- Subject: Re: [glibc/google/grte/v5-2.27/master] Fix sense of a test in the static-linking version of ppc get_clockfreq
- References: <20190517192546.22134.qmail@sourceware.org>
On 5/17/19 2:25 PM, Stan Shebs wrote:
> https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4791e4f773d060c1a37b27aac5b03cdfa9327afc
>
> commit 4791e4f773d060c1a37b27aac5b03cdfa9327afc
> Author: Stan Shebs <stanshebs@google.com>
> Date: Fri May 17 12:25:19 2019 -0700
>
> Fix sense of a test in the static-linking version of ppc get_clockfreq
>
Stan,
This looks like a fix that should go on master?
Cheers,
Carlos.
> Diff:
> ---
> sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c b/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c
> index 8821218..4e4c2a2 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c
> +++ b/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c
> @@ -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
>
--
Cheers,
Carlos.