Browse Source

fix signed/unsigned mismatch warning

pull/865/merge
Anatol Belski 11 years ago
parent
commit
6075e5a549
  1. 7
      sapi/cli/php_http_parser.c

7
sapi/cli/php_http_parser.c

@ -1431,7 +1431,9 @@ size_t php_http_parser_execute (php_http_parser *parser,
}
case s_body_identity:
to_read = MIN(pe - p, (size_t)parser->content_length);
assert(pe >= p);
to_read = MIN((size_t)(pe - p), (size_t)parser->content_length);
if (to_read > 0) {
if (settings->on_body) settings->on_body(parser, p, to_read);
p += to_read - 1;
@ -1515,8 +1517,9 @@ size_t php_http_parser_execute (php_http_parser *parser,
case s_chunk_data:
{
assert(parser->flags & F_CHUNKED);
assert(pe >= p);
to_read = MIN(pe - p, (size_t)(parser->content_length));
to_read = MIN((size_t)(pe - p), (size_t)(parser->content_length));
if (to_read > 0) {
if (settings->on_body) settings->on_body(parser, p, to_read);

Loading…
Cancel
Save