Skip to content

Commit 927830d

Browse files
authored
phar: Remove unused min_timestamp field (#20617)
1 parent dddd050 commit 927830d

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

ext/phar/phar.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,15 +1149,9 @@ static zend_result phar_parse_pharfile(php_stream *fp, char *fname, size_t fname
11491149
PHAR_GET_32(buffer, entry.uncompressed_filesize);
11501150
PHAR_GET_32(buffer, entry.timestamp);
11511151

1152-
if (offset == halt_offset + manifest_len + 4) {
1153-
mydata->min_timestamp = entry.timestamp;
1152+
if (offset == halt_offset + manifest_len + 4
1153+
|| mydata->max_timestamp < entry.timestamp) {
11541154
mydata->max_timestamp = entry.timestamp;
1155-
} else {
1156-
if (mydata->min_timestamp > entry.timestamp) {
1157-
mydata->min_timestamp = entry.timestamp;
1158-
} else if (mydata->max_timestamp < entry.timestamp) {
1159-
mydata->max_timestamp = entry.timestamp;
1160-
}
11611155
}
11621156

11631157
PHAR_GET_32(buffer, entry.compressed_filesize);

ext/phar/phar_internal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ struct _phar_archive_data {
258258
/* hash of mounted directory paths */
259259
HashTable mounted_dirs;
260260
uint32_t flags;
261-
uint32_t min_timestamp;
262261
uint32_t max_timestamp;
263262
int refcount;
264263
php_stream *fp;

0 commit comments

Comments
 (0)