mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
fix size_t signed comparison
This commit is contained in:
parent
a5718539b1
commit
dbae1653da
2 changed files with 3 additions and 2 deletions
|
@ -106,7 +106,8 @@ static size_t readline_shell_ub_write(const char *str, size_t str_length) /* {{{
|
|||
caller (sapi_cli_single_write in sapi/cli) which will actually
|
||||
write due to -1 return code */
|
||||
php_last_char = str[str_length-1];
|
||||
return -1;
|
||||
|
||||
return (size_t) -1;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ static size_t sapi_cli_ub_write(const char *str, size_t str_length) /* {{{ */
|
|||
if (cli_shell_callbacks.cli_shell_ub_write) {
|
||||
size_t ub_wrote;
|
||||
ub_wrote = cli_shell_callbacks.cli_shell_ub_write(str, str_length);
|
||||
if (ub_wrote > -1) {
|
||||
if (ub_wrote != (size_t) -1) {
|
||||
return ub_wrote;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue