aboutsummaryrefslogtreecommitdiff
path: root/wcsmbs
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs')
-rw-r--r--wcsmbs/mbrtoc16.c2
-rw-r--r--wcsmbs/mbrtowc.c2
-rw-r--r--wcsmbs/wcsmbsload.c2
-rw-r--r--wcsmbs/wcsmbsload.h4
4 files changed, 5 insertions, 5 deletions
diff --git a/wcsmbs/mbrtoc16.c b/wcsmbs/mbrtoc16.c
index 9fa31bc..643aaf5 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 6eeaa55..c57217a 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 8267faf..84733b3 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 a709428..7636da7 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);
}