Skip to content

Remove unused fields from phar_entry_data #14144

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 7, 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_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,6 @@ typedef struct _phar_entry_data {
zend_off_t position;
/* for copies of the phar fp, defines where 0 is */
zend_off_t zero;
uint32_t for_write:1;
uint32_t is_zip:1;
uint32_t is_tar:1;
phar_entry_info *internal_file;
} phar_entry_data;

Expand Down
9 changes: 0 additions & 9 deletions ext/phar/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,7 @@ int phar_get_entry_data(phar_entry_data **ret, char *fname, size_t fname_len, ch
(*ret)->position = 0;
(*ret)->fp = NULL;
(*ret)->phar = phar;
(*ret)->for_write = for_write;
(*ret)->internal_file = entry;
(*ret)->is_zip = entry->is_zip;
(*ret)->is_tar = entry->is_tar;

if (!phar->is_persistent) {
++(entry->phar->refcount);
Expand Down Expand Up @@ -486,10 +483,7 @@ int phar_get_entry_data(phar_entry_data **ret, char *fname, size_t fname_len, ch
*ret = (phar_entry_data *) emalloc(sizeof(phar_entry_data));
(*ret)->position = 0;
(*ret)->phar = phar;
(*ret)->for_write = for_write;
(*ret)->internal_file = entry;
(*ret)->is_zip = entry->is_zip;
(*ret)->is_tar = entry->is_tar;
(*ret)->fp = phar_get_efp(entry, 1);
if (entry->link) {
phar_entry_info *link = phar_get_link_source(entry);
Expand Down Expand Up @@ -616,9 +610,6 @@ phar_entry_data *phar_get_or_create_entry_data(char *fname, size_t fname_len, ch
ret->phar = phar;
ret->fp = entry->fp;
ret->position = ret->zero = 0;
ret->for_write = 1;
ret->is_zip = entry->is_zip;
ret->is_tar = entry->is_tar;
ret->internal_file = entry;

return ret;
Expand Down