Skip to content

Commit 96ffdd4

Browse files
committed
size variable is only used once, move closer to usage
Also change type to ssize_t as this is what the function returns
1 parent 3fb63f7 commit 96ffdd4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/phar/func_interceptors.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ PHAR_FUNC(phar_file_get_contents) /* {{{ */
230230
PHAR_FUNC(phar_readfile) /* {{{ */
231231
{
232232
zend_string *filename;
233-
int size = 0;
234233
bool use_include_path = 0;
235234
zval *zcontext = NULL;
236235
php_stream *stream;
@@ -259,7 +258,7 @@ PHAR_FUNC(phar_readfile) /* {{{ */
259258
if (stream == NULL) {
260259
RETURN_FALSE;
261260
}
262-
size = php_stream_passthru(stream);
261+
ssize_t size = php_stream_passthru(stream);
263262
php_stream_close(stream);
264263
RETURN_LONG(size);
265264
}

0 commit comments

Comments
 (0)