Skip to content

Remove unused field from _phar_archive_data #14146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions ext/phar/phar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,6 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, size_t fname_len, ch
}

snprintf(mydata->version, sizeof(mydata->version), "%u.%u.%u", manifest_ver >> 12, (manifest_ver >> 8) & 0xF, (manifest_ver >> 4) & 0xF);
mydata->internal_file_start = halt_offset + manifest_len + 4;
mydata->halt_offset = halt_offset;
mydata->flags = manifest_flags;
endbuffer = strrchr(mydata->fname, '/');
Expand Down Expand Up @@ -1472,7 +1471,6 @@ int phar_create_or_parse_filename(char *fname, size_t fname_len, char *alias, si
mydata->fname_len = fname_len;
snprintf(mydata->version, sizeof(mydata->version), "%s", PHP_PHAR_API_VERSION);
mydata->is_temporary_alias = alias ? 0 : 1;
mydata->internal_file_start = -1;
mydata->fp = NULL;
mydata->is_writeable = 1;
mydata->is_brandnew = 1;
Expand Down Expand Up @@ -3181,7 +3179,6 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
php_stream_close(oldfile);
}

phar->internal_file_start = halt_offset + manifest_len + 4;
phar->halt_offset = halt_offset;
phar->is_brandnew = 0;

Expand Down
1 change: 0 additions & 1 deletion ext/phar/phar_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ struct _phar_archive_data {
char *alias;
uint32_t alias_len;
char version[12];
size_t internal_file_start;
size_t halt_offset;
HashTable manifest;
/* hash of virtual directories, as in path/to/file.txt has path/to and path as virtual directories */
Expand Down
1 change: 0 additions & 1 deletion ext/phar/tar.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ int phar_open_or_create_tar(char *fname, size_t fname_len, char *alias, size_t a
if (phar->is_brandnew) {
phar->is_tar = 1;
phar->is_zip = 0;
phar->internal_file_start = 0;
return SUCCESS;
}

Expand Down
1 change: 0 additions & 1 deletion ext/phar/zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,6 @@ int phar_open_or_create_zip(char *fname, size_t fname_len, char *alias, size_t a
}

if (phar->is_brandnew) {
phar->internal_file_start = 0;
phar->is_zip = 1;
phar->is_tar = 0;
return SUCCESS;
Expand Down
Loading