mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-24 20:08:01 +00:00
BUG/MINOR: utf8: remove compilator warning
'c' is an unsigned int, obviously it is '>= 0'. This patch remove the '>= 0' test. this bug is repported by Dmitry Sivachenko
This commit is contained in:
parent
7f4942a978
commit
9e7ec08976
@ -2659,7 +2659,7 @@ unsigned char utf8_next(const char *s, int len, unsigned int *c)
|
|||||||
* 2 bytes : 4 + 6 + 6 : 16 : 0x800 ... 0xffff
|
* 2 bytes : 4 + 6 + 6 : 16 : 0x800 ... 0xffff
|
||||||
* 3 bytes : 3 + 6 + 6 + 6 : 21 : 0x10000 ... 0x1fffff
|
* 3 bytes : 3 + 6 + 6 + 6 : 21 : 0x10000 ... 0x1fffff
|
||||||
*/
|
*/
|
||||||
if ((*c >= 0x00 && *c <= 0x7f && (p-(unsigned char *)s) > 1) ||
|
if (( *c <= 0x7f && (p-(unsigned char *)s) > 1) ||
|
||||||
(*c >= 0x80 && *c <= 0x7ff && (p-(unsigned char *)s) > 2) ||
|
(*c >= 0x80 && *c <= 0x7ff && (p-(unsigned char *)s) > 2) ||
|
||||||
(*c >= 0x800 && *c <= 0xffff && (p-(unsigned char *)s) > 3) ||
|
(*c >= 0x800 && *c <= 0xffff && (p-(unsigned char *)s) > 3) ||
|
||||||
(*c >= 0x10000 && *c <= 0x1fffff && (p-(unsigned char *)s) > 4))
|
(*c >= 0x10000 && *c <= 0x1fffff && (p-(unsigned char *)s) > 4))
|
||||||
|
Loading…
Reference in New Issue
Block a user