com php-src: fix datatype mismatch: sapi/cgi/cgi_main.c

From: Date: Tue, 02 Dec 2014 08:15:09 +0000
Subject: com php-src: fix datatype mismatch: sapi/cgi/cgi_main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83476@lists.php.net to get a copy of this message
Commit: 4cba2f9811a99910f7f8ec501894668474caad02 Author: Anatol Belski <ab@php.net> Tue, 2 Dec 2014 08:37:11 +0100 Parents: 1172aff298c63bc71765eb53b1c13e81428b4332 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4cba2f9811a99910f7f8ec501894668474caad02 Log: fix datatype mismatch Changed paths: M sapi/cgi/cgi_main.c Diff: diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 23374e7..da35dde 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -1664,7 +1664,7 @@ PHP_FUNCTION(apache_request_headers) /* {{{ */ static void add_response_header(sapi_header_struct *h, zval *return_value TSRMLS_DC) /* {{{ */ { char *s, *p; - int len = 0; + size_t len = 0; ALLOCA_FLAG(use_heap) if (h->header_len > 0) { @@ -1673,9 +1673,9 @@ static void add_response_header(sapi_header_struct *h, zval *return_value TSRMLS len = p - h->header; } if (len > 0) { - while (len > 0 && (h->header[len-1] == ' ' || h->header[len-1] == '\t')) { + do { len--; - } + } while (len != 0 && (h->header[len-1] == ' ' || h->header[len-1] == '\t')); if (len) { s = do_alloca(len + 1, use_heap); memcpy(s, h->header, len);

« previous php.cvs (#83476) next »