fix size_t signed comparison

This commit is contained in:
Joe Watkins 2016-04-29 10:19:55 +01:00
parent a5718539b1
commit dbae1653da
2 changed files with 3 additions and 2 deletions

View file

@ -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;
}
/* }}} */

View file

@ -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;
}
}