Skip to content

Commit a6b58ee

Browse files
committed
ext/phar: mark phar_dostat() as static
And remove unused declaration from dirstream.c file
1 parent 0366899 commit a6b58ee

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

ext/phar/dirstream.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
#include "phar_internal.h"
2020
#include "dirstream.h"
2121

22-
void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_statbuf *ssb, bool is_dir);
23-
2422
static const php_stream_ops phar_dir_ops = {
2523
phar_dir_write, /* write */
2624
phar_dir_read, /* read */

ext/phar/stream.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ static int phar_stream_flush(php_stream *stream) /* {{{ */
482482
/**
483483
* stat an opened phar file handle stream, used by phar_stat()
484484
*/
485-
void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_statbuf *ssb, bool is_temp_dir)
485+
static void phar_dostat(const phar_archive_data *phar, const phar_entry_info *data, php_stream_statbuf *ssb, bool is_temp_dir)
486486
{
487487
memset(ssb, 0, sizeof(php_stream_statbuf));
488488

@@ -536,7 +536,7 @@ void phar_dostat(phar_archive_data *phar, phar_entry_info *data, php_stream_stat
536536
*/
537537
static int phar_stream_stat(php_stream *stream, php_stream_statbuf *ssb) /* {{{ */
538538
{
539-
phar_entry_data *data = (phar_entry_data *)stream->abstract;
539+
const phar_entry_data *data = stream->abstract;
540540

541541
/* If ssb is NULL then someone is misbehaving */
542542
if (!ssb) {

0 commit comments

Comments
 (0)