Skip to content

Commit f52a332

Browse files
committed
ext/dom: Fix [-Wsign-compare] warnings
1 parent bb2fae1 commit f52a332

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/dom/characterdata.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ PHP_METHOD(DOMCharacterData, substringData)
135135
RETURN_FALSE;
136136
}
137137

138-
if (offset > length) {
138+
if (offset > (unsigned int)length) {
139139
php_dom_throw_error(INDEX_SIZE_ERR, dom_get_strict_error(intern->document));
140140
RETURN_FALSE;
141141
}
@@ -230,7 +230,7 @@ static void dom_character_data_insert_data(INTERNAL_FUNCTION_PARAMETERS, bool re
230230
RETURN_FALSE;
231231
}
232232

233-
if (offset > length) {
233+
if (offset > (unsigned int)length) {
234234
php_dom_throw_error(INDEX_SIZE_ERR, dom_get_strict_error(intern->document));
235235
RETURN_FALSE;
236236
}

0 commit comments

Comments
 (0)