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

From: Date: Tue, 02 Dec 2014 08:15:10 +0000
Subject: com php-src: fix datatype mismatches: sapi/cgi/cgi_main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83475@lists.php.net to get a copy of this message
Commit: 1bcc7d919c2c1aff50966c450723c9d84090da99 Author: Anatol Belski <ab@php.net> Tue, 2 Dec 2014 08:58:39 +0100 Parents: 4cba2f9811a99910f7f8ec501894668474caad02 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1bcc7d919c2c1aff50966c450723c9d84090da99 Log: fix datatype mismatches Changed paths: M sapi/cgi/cgi_main.c Diff: diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index da35dde..5d3ee5b 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -1197,7 +1197,7 @@ static void init_request_info(fcgi_request *request TSRMLS_DC) char *orig_path_info = env_path_info; char *orig_script_name = env_script_name; char *orig_script_filename = env_script_filename; - int script_path_translated_len; + size_t script_path_translated_len; if (!env_document_root && PG(doc_root)) { env_document_root = CGI_PUTENV("DOCUMENT_ROOT", PG(doc_root)); @@ -1238,7 +1238,7 @@ static void init_request_info(fcgi_request *request TSRMLS_DC) (real_path = tsrm_realpath(script_path_translated, NULL TSRMLS_CC)) == NULL) ) { char *pt = estrndup(script_path_translated, script_path_translated_len); - int len = script_path_translated_len; + size_t len = script_path_translated_len; char *ptr; while ((ptr = strrchr(pt, '/')) || (ptr = strrchr(pt, '\\'))) { @@ -1259,8 +1259,8 @@ static void init_request_info(fcgi_request *request TSRMLS_DC) * we have to play the game of hide and seek to figure * out what SCRIPT_NAME should be */ - int slen = len - strlen(pt); - int pilen = env_path_info ? strlen(env_path_info) : 0; + size_t slen = len - strlen(pt); + size_t pilen = env_path_info ? strlen(env_path_info) : 0; char *path_info = env_path_info ? env_path_info + pilen - slen : NULL; if (orig_path_info != path_info) { @@ -1296,8 +1296,8 @@ static void init_request_info(fcgi_request *request TSRMLS_DC) * SCRIPT_FILENAME minus SCRIPT_NAME */ if (env_document_root) { - int l = strlen(env_document_root); - int path_translated_len = 0; + size_t l = strlen(env_document_root); + size_t path_translated_len = 0; char *path_translated = NULL; if (l && env_document_root[l - 1] == '/') { @@ -1326,8 +1326,8 @@ static void init_request_info(fcgi_request *request TSRMLS_DC) strstr(pt, env_script_name) ) { /* PATH_TRANSLATED = PATH_TRANSLATED - SCRIPT_NAME + PATH_INFO */ - int ptlen = strlen(pt) - strlen(env_script_name); - int path_translated_len = ptlen + (env_path_info ? strlen(env_path_info) : 0); + size_t ptlen = strlen(pt) - strlen(env_script_name); + size_t path_translated_len = ptlen + (env_path_info ? strlen(env_path_info) : 0); char *path_translated = NULL; path_translated = (char *) emalloc(path_translated_len + 1);

« previous php.cvs (#83475) next »