aboutsummaryrefslogtreecommitdiff
path: root/iconv
diff options
context:
space:
mode:
Diffstat (limited to 'iconv')
-rw-r--r--iconv/loop.c2
-rw-r--r--iconv/skeleton.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/iconv/loop.c b/iconv/loop.c
index ffdd24d..c8f8934 100644
--- a/iconv/loop.c
+++ b/iconv/loop.c
@@ -307,7 +307,7 @@ SINGLE(LOOPFCT) (const unsigned char **inptrp, const unsigned char *inend,
#endif
/* Are there enough bytes in the input buffer? */
- if (inptr + (MAX_NEEDED_INPUT - inlen) > inend)
+ if (__builtin_expect (inptr + (MAX_NEEDED_INPUT - inlen) > inend, 0))
{
#ifdef STORE_REST
*inptrp = inend;
diff --git a/iconv/skeleton.c b/iconv/skeleton.c
index 50ee45d..81677cc 100644
--- a/iconv/skeleton.c
+++ b/iconv/skeleton.c
@@ -281,7 +281,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
/* If the function is called with no input this means we have to reset
to the initial state. The possibly partly converted input is
dropped. */
- if (do_flush)
+ if (__builtin_expect (do_flush, 0))
{
status = __GCONV_OK;
@@ -439,7 +439,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
if (result != __GCONV_EMPTY_INPUT)
{
- if (outerr != outbuf)
+ if (__builtin_expect (outerr != outbuf, 0))
{
#ifdef RESET_INPUT_BUFFER
RESET_INPUT_BUFFER;