This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] __builtin_expect cleanup for iconvdata/*.c


Florian Weimer <fweimer@redhat.com> writes:

> --- a/iconvdata/iso-2022-cn.c
> +++ b/iconvdata/iso-2022-cn.c
> @@ -126,22 +126,22 @@ enum
>        STANDARD_FROM_LOOP_ERR_HANDLER (1);				      \
>  									      \
>      /* Recognize escape sequences.  */					      \
> -    if (__builtin_expect (ch, 0) == ESC)				      \
> +    if (__glibc_unlikely (ch) == ESC)					      \

Shouldn't that be __glibc_unlikely (ch == ESC)?
I guess it makes no difference in practice, but it looks wrong.
There are other changes like that, for example:

-	if (__builtin_expect (found, 1) != __UNKNOWN_10646_CHAR)	      \
+	if (__glibc_likely (found) != __UNKNOWN_10646_CHAR)		      \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]