Skip to content

Commit c37bd23

Browse files
committed
Remove zero size special case for copy_to_stream
1 parent 22fc522 commit c37bd23

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

main/streams/streams.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,6 @@ PHPAPI int _php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, size
15391539
size_t haveread = 0;
15401540
size_t towrite;
15411541
size_t dummy;
1542-
php_stream_statbuf ssbuf;
15431542

15441543
if (!len) {
15451544
len = &dummy;
@@ -1554,17 +1553,6 @@ PHPAPI int _php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, size
15541553
maxlen = 0;
15551554
}
15561555

1557-
if (php_stream_stat(src, &ssbuf) == 0) {
1558-
if (ssbuf.sb.st_size == 0
1559-
#ifdef S_ISREG
1560-
&& S_ISREG(ssbuf.sb.st_mode)
1561-
#endif
1562-
) {
1563-
*len = 0;
1564-
return SUCCESS;
1565-
}
1566-
}
1567-
15681556
if (php_stream_mmap_possible(src)) {
15691557
char *p;
15701558

0 commit comments

Comments
 (0)