aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2014-07-03 01:30:02 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2014-07-03 01:49:48 +0530
commit05fdac772bee5352a52f26682dd351712e92f9b3 (patch)
treeb33268e619fe986dfe6a00fad499ca7d77635136
parent99f8dc922033821edcc13f9f8360e9fda40dfcff (diff)
downloadglibc-05fdac772bee5352a52f26682dd351712e92f9b3.tar
glibc-05fdac772bee5352a52f26682dd351712e92f9b3.tar.gz
glibc-05fdac772bee5352a52f26682dd351712e92f9b3.tar.bz2
glibc-05fdac772bee5352a52f26682dd351712e92f9b3.zip
Don't use __glibc_unlikely in shared code
-rw-r--r--ChangeLog2
-rw-r--r--intl/loadmsgcat.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b52389634a..7b336046bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2014-07-02 Siddhesh Poyarekar <siddhesh@redhat.com>
+ * intl/loadmsgcat.c (_nl_load_domain): Use __builtin_expect.
+
* debug/memcpy_chk.c: Don't include pagecopy.h.
* debug/mempcpy_chk.c: Likewise.
* string/memcpy.c: Likewise.
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
index 325d699c86..7497172e72 100644
--- a/intl/loadmsgcat.c
+++ b/intl/loadmsgcat.c
@@ -820,7 +820,7 @@ _nl_load_domain (struct loaded_l10nfile *domain_file,
data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
MAP_PRIVATE, fd, 0);
- if (__glibc_likely (data != MAP_FAILED))
+ if (__builtin_expect (data != MAP_FAILED, 1))
{
/* mmap() call was successful. */
close (fd);
@@ -1248,7 +1248,7 @@ _nl_load_domain (struct loaded_l10nfile *domain_file,
/* Get the header entry and look for a plural specification. */
nullentry = _nl_find_msg (domain_file, domainbinding, "", 0, &nullentrylen);
- if (__glibc_unlikely (nullentry == (char *) -1))
+ if (__builtin_expect (nullentry == (char *) -1, 0))
{
__libc_rwlock_fini (domain->conversions_lock);
goto invalid;