diff options
Diffstat (limited to 'libiconv/iconv.c')
-rw-r--r-- | libiconv/iconv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libiconv/iconv.c b/libiconv/iconv.c index ca92de8dd..6876ab5f7 100644 --- a/libiconv/iconv.c +++ b/libiconv/iconv.c @@ -199,7 +199,7 @@ static void put_16(unsigned char *s, unsigned c, int e) static unsigned get_32(const unsigned char *s, int e) { e &= 3; - return s[e]+0U<<24 | s[e^1]<<16 | s[e^2]<<8 | s[e^3]; + return (s[e]+0U)<<24 | s[e^1]<<16 | s[e^2]<<8 | s[e^3]; } static void put_32(unsigned char *s, unsigned c, int e) @@ -331,7 +331,7 @@ static unsigned legacy_map(const unsigned char *map, unsigned c) { if (c < 4*map[-1]) return c; unsigned x = c - 4*map[-1]; - x = map[x*5/4]>>2*x%8 | map[x*5/4+1]<<8-2*x%8 & 1023; + x = map[x*5/4]>>(2*x%8) | (map[x*5/4+1]<<(8-2*x%8) & 1023); return x < 256 ? x : legacy_chars[x-256]; } |