Skip to content

Commit 792630b

Browse files
committed
Use strpprintf
1 parent 592b254 commit 792630b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ext/phar/stream.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, const cha
231231
}
232232
}
233233
if (opened_path) {
234-
*opened_path = zend_strpprintf(MAXPATHLEN, "phar://%s/%s", idata->phar->fname, idata->internal_file->filename);
234+
*opened_path = strpprintf(MAXPATHLEN, "phar://%s/%s", idata->phar->fname, idata->internal_file->filename);
235235
}
236236
return fpf;
237237
} else {
@@ -249,7 +249,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, const cha
249249
}
250250
efree(internal_file);
251251
if (opened_path) {
252-
*opened_path = zend_strpprintf(MAXPATHLEN, "%s", phar->fname);
252+
*opened_path = strpprintf(MAXPATHLEN, "%s", phar->fname);
253253
}
254254
php_url_free(resource);
255255
goto phar_stub;
@@ -275,7 +275,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, const cha
275275
++(entry->fp_refcount);
276276
php_url_free(resource);
277277
if (opened_path) {
278-
*opened_path = zend_strpprintf(MAXPATHLEN, "%s", phar->fname);
278+
*opened_path = strpprintf(MAXPATHLEN, "%s", phar->fname);
279279
}
280280
efree(internal_file);
281281
goto phar_stub;
@@ -332,7 +332,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, const cha
332332
}
333333
}
334334
if (opened_path) {
335-
*opened_path = zend_strpprintf(MAXPATHLEN, "phar://%s/%s", idata->phar->fname, idata->internal_file->filename);
335+
*opened_path = strpprintf(MAXPATHLEN, "phar://%s/%s", idata->phar->fname, idata->internal_file->filename);
336336
}
337337
efree(internal_file);
338338
phar_stub:

ext/phar/util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,14 +300,14 @@ zend_string *phar_find_in_include_path(char *filename, int filename_len, phar_ar
300300

301301
if (*test == '/') {
302302
if (zend_hash_str_exists(&(phar->manifest), test + 1, try_len - 1)) {
303-
ret = zend_strpprintf(0, "phar://%s%s", arch, test);
303+
ret = strpprintf(0, "phar://%s%s", arch, test);
304304
efree(arch);
305305
efree(test);
306306
return ret;
307307
}
308308
} else {
309309
if (zend_hash_str_exists(&(phar->manifest), test, try_len)) {
310-
ret = zend_strpprintf(0, "phar://%s/%s", arch, test);
310+
ret = strpprintf(0, "phar://%s/%s", arch, test);
311311
efree(arch);
312312
efree(test);
313313
return ret;

0 commit comments

Comments
 (0)