diff options
author | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 14:45:42 +0100 |
---|---|---|
committer | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 15:07:12 +0100 |
commit | a1ffb40e32741f992c743e7b16c061fefa3747ac (patch) | |
tree | 246a29a87b26cfd5d07b17070f85eb3785018de9 /wcsmbs | |
parent | 1448f3244714a9dabb5240ec18b094f100887d5c (diff) | |
download | glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz |
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'wcsmbs')
-rw-r--r-- | wcsmbs/mbrtoc16.c | 2 | ||||
-rw-r--r-- | wcsmbs/mbrtowc.c | 2 | ||||
-rw-r--r-- | wcsmbs/wcsmbsload.c | 2 | ||||
-rw-r--r-- | wcsmbs/wcsmbsload.h | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/wcsmbs/mbrtoc16.c b/wcsmbs/mbrtoc16.c index 9fa31bc568..643aaf585c 100644 --- a/wcsmbs/mbrtoc16.c +++ b/wcsmbs/mbrtoc16.c @@ -88,7 +88,7 @@ mbrtoc16 (char16_t *pc16, const char *s, size_t n, mbstate_t *ps) /* Do a normal conversion. */ inbuf = (const unsigned char *) s; endbuf = inbuf + n; - if (__builtin_expect (endbuf < inbuf, 0)) + if (__glibc_unlikely (endbuf < inbuf)) { endbuf = (const unsigned char *) ~(uintptr_t) 0; if (endbuf == inbuf) diff --git a/wcsmbs/mbrtowc.c b/wcsmbs/mbrtowc.c index 6eeaa55be6..c57217add5 100644 --- a/wcsmbs/mbrtowc.c +++ b/wcsmbs/mbrtowc.c @@ -70,7 +70,7 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) /* Do a normal conversion. */ inbuf = (const unsigned char *) s; endbuf = inbuf + n; - if (__builtin_expect (endbuf < inbuf, 0)) + if (__glibc_unlikely (endbuf < inbuf)) { endbuf = (const unsigned char *) ~(uintptr_t) 0; if (endbuf == inbuf) diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c index 8267faf9c4..84733b35fe 100644 --- a/wcsmbs/wcsmbsload.c +++ b/wcsmbs/wcsmbsload.c @@ -156,7 +156,7 @@ __wcsmbs_load_conv (struct __locale_data *new_category) /* We should repeat the test since while we waited some other thread might have run this function. */ - if (__builtin_expect (new_category->private.ctype == NULL, 1)) + if (__glibc_likely (new_category->private.ctype == NULL)) { /* We must find the real functions. */ const char *charset_name; diff --git a/wcsmbs/wcsmbsload.h b/wcsmbs/wcsmbsload.h index a709428631..7636da7b65 100644 --- a/wcsmbs/wcsmbsload.h +++ b/wcsmbs/wcsmbsload.h @@ -68,9 +68,9 @@ extern const struct __locale_data _nl_C_LC_CTYPE attribute_hidden; static inline const struct gconv_fcts * get_gconv_fcts (struct __locale_data *data) { - if (__builtin_expect (data->private.ctype == NULL, 0)) + if (__glibc_unlikely (data->private.ctype == NULL)) { - if (__builtin_expect (data == &_nl_C_LC_CTYPE, 0)) + if (__glibc_unlikely (data == &_nl_C_LC_CTYPE)) return &__wcsmbs_gconv_fcts_c; __wcsmbs_load_conv (data); } |