Skip to content

Commit 7b60f53

Browse files
authored
Remove unused field from _phar_archive_data (#14146)
This field is only ever written to, but never read.
1 parent 55966f0 commit 7b60f53

File tree

4 files changed

+0
-6
lines changed

4 files changed

+0
-6
lines changed

ext/phar/phar.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,6 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, size_t fname_len, ch
12311231
}
12321232

12331233
snprintf(mydata->version, sizeof(mydata->version), "%u.%u.%u", manifest_ver >> 12, (manifest_ver >> 8) & 0xF, (manifest_ver >> 4) & 0xF);
1234-
mydata->internal_file_start = halt_offset + manifest_len + 4;
12351234
mydata->halt_offset = halt_offset;
12361235
mydata->flags = manifest_flags;
12371236
endbuffer = strrchr(mydata->fname, '/');
@@ -1472,7 +1471,6 @@ int phar_create_or_parse_filename(char *fname, size_t fname_len, char *alias, si
14721471
mydata->fname_len = fname_len;
14731472
snprintf(mydata->version, sizeof(mydata->version), "%s", PHP_PHAR_API_VERSION);
14741473
mydata->is_temporary_alias = alias ? 0 : 1;
1475-
mydata->internal_file_start = -1;
14761474
mydata->fp = NULL;
14771475
mydata->is_writeable = 1;
14781476
mydata->is_brandnew = 1;
@@ -3181,7 +3179,6 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
31813179
php_stream_close(oldfile);
31823180
}
31833181

3184-
phar->internal_file_start = halt_offset + manifest_len + 4;
31853182
phar->halt_offset = halt_offset;
31863183
phar->is_brandnew = 0;
31873184

ext/phar/phar_internal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ struct _phar_archive_data {
285285
char *alias;
286286
uint32_t alias_len;
287287
char version[12];
288-
size_t internal_file_start;
289288
size_t halt_offset;
290289
HashTable manifest;
291290
/* hash of virtual directories, as in path/to/file.txt has path/to and path as virtual directories */

ext/phar/tar.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ int phar_open_or_create_tar(char *fname, size_t fname_len, char *alias, size_t a
146146
if (phar->is_brandnew) {
147147
phar->is_tar = 1;
148148
phar->is_zip = 0;
149-
phar->internal_file_start = 0;
150149
return SUCCESS;
151150
}
152151

ext/phar/zip.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,6 @@ int phar_open_or_create_zip(char *fname, size_t fname_len, char *alias, size_t a
842842
}
843843

844844
if (phar->is_brandnew) {
845-
phar->internal_file_start = 0;
846845
phar->is_zip = 1;
847846
phar->is_tar = 0;
848847
return SUCCESS;

0 commit comments

Comments
 (0)