diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-05-14 01:03:08 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-05-14 01:03:08 -0400 |
commit | 0656e90edc091f122284b602d2d590314e40c97a (patch) | |
tree | 3f18f65d2bd00ead8a11ef951a6cc1aabbdea8c8 /iconv/loop.c | |
parent | 1af4e29837e9969377781b47254b6e4c293353ed (diff) | |
download | glibc-0656e90edc091f122284b602d2d590314e40c97a.zip glibc-0656e90edc091f122284b602d2d590314e40c97a.tar.gz glibc-0656e90edc091f122284b602d2d590314e40c97a.tar.bz2 |
Optimize conversion of single character in gconv
Diffstat (limited to 'iconv/loop.c')
-rw-r--r-- | iconv/loop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/iconv/loop.c b/iconv/loop.c index 72fef94..4f43062 100644 --- a/iconv/loop.c +++ b/iconv/loop.c @@ -395,7 +395,8 @@ SINGLE(LOOPFCT) (struct __gconv_step *step, #endif /* Are there enough bytes in the input buffer? */ - if (__builtin_expect (inptr + (MIN_NEEDED_INPUT - inlen) > inend, 0)) + if (MIN_NEEDED_INPUT > 1 + && __builtin_expect (inptr + (MIN_NEEDED_INPUT - inlen) > inend, 0)) { *inptrp = inend; #ifdef STORE_REST |