From: Xinchen Hui Date: Thu, 5 Mar 2015 04:40:09 +0000 (+0800) Subject: Use strpprintf X-Git-Tag: PRE_PHP7_NSAPI_REMOVAL~816 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=792630bc50381457cf086340637328ecfa691af4;p=php Use strpprintf --- diff --git a/ext/phar/stream.c b/ext/phar/stream.c index e05b1663c2..af18fe0287 100644 --- a/ext/phar/stream.c +++ b/ext/phar/stream.c @@ -231,7 +231,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, const cha } } if (opened_path) { - *opened_path = zend_strpprintf(MAXPATHLEN, "phar://%s/%s", idata->phar->fname, idata->internal_file->filename); + *opened_path = strpprintf(MAXPATHLEN, "phar://%s/%s", idata->phar->fname, idata->internal_file->filename); } return fpf; } else { @@ -249,7 +249,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, const cha } efree(internal_file); if (opened_path) { - *opened_path = zend_strpprintf(MAXPATHLEN, "%s", phar->fname); + *opened_path = strpprintf(MAXPATHLEN, "%s", phar->fname); } php_url_free(resource); goto phar_stub; @@ -275,7 +275,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, const cha ++(entry->fp_refcount); php_url_free(resource); if (opened_path) { - *opened_path = zend_strpprintf(MAXPATHLEN, "%s", phar->fname); + *opened_path = strpprintf(MAXPATHLEN, "%s", phar->fname); } efree(internal_file); goto phar_stub; @@ -332,7 +332,7 @@ idata_error: } } if (opened_path) { - *opened_path = zend_strpprintf(MAXPATHLEN, "phar://%s/%s", idata->phar->fname, idata->internal_file->filename); + *opened_path = strpprintf(MAXPATHLEN, "phar://%s/%s", idata->phar->fname, idata->internal_file->filename); } efree(internal_file); phar_stub: diff --git a/ext/phar/util.c b/ext/phar/util.c index 190f69cf61..f769b012e4 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -300,14 +300,14 @@ splitted: if (*test == '/') { if (zend_hash_str_exists(&(phar->manifest), test + 1, try_len - 1)) { - ret = zend_strpprintf(0, "phar://%s%s", arch, test); + ret = strpprintf(0, "phar://%s%s", arch, test); efree(arch); efree(test); return ret; } } else { if (zend_hash_str_exists(&(phar->manifest), test, try_len)) { - ret = zend_strpprintf(0, "phar://%s/%s", arch, test); + ret = strpprintf(0, "phar://%s/%s", arch, test); efree(arch); efree(test); return ret;