Skip to content

Commit 5081a1c

Browse files
committed
encoder: Fix compiler warnings
1 parent 6d7a22d commit 5081a1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/simdjson_encoder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ static zend_always_inline void simdjson_escape_short_string(smart_str *buf, cons
564564

565565
// Simplified version of php_next_utf8_char
566566
static unsigned int simdjson_get_next_char(const unsigned char *str, size_t str_len) {
567-
if (!str_len >= 1)
567+
if (str_len < 1)
568568
return 1;
569569

570570
/* We'll follow strategy 2. from section 3.6.1 of UTR #36:
@@ -576,7 +576,7 @@ static unsigned int simdjson_get_next_char(const unsigned char *str, size_t str_
576576
if (c < 0x80 || c < 0xc2) {
577577
return 1;
578578
} else if (c < 0xe0) {
579-
if (!str_len >= 2)
579+
if (str_len < 2)
580580
return 1;
581581

582582
if (!utf8_trail(str[1])) {

0 commit comments

Comments
 (0)