Simplify declaration

This commit is contained in:
Anatol Belski 2018-02-16 15:21:32 +01:00
parent 325934c057
commit 7761c819bf

View File

@ -1363,9 +1363,8 @@ static void init_request_info(fcgi_request *request)
/* PATH_TRANSLATED = PATH_TRANSLATED - SCRIPT_NAME + PATH_INFO */
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);
char *path_translated = (char *) emalloc(path_translated_len + 1);
memcpy(path_translated, pt, ptlen);
if (env_path_info) {
memcpy(path_translated + ptlen, env_path_info, path_translated_len - ptlen);