]> granicus.if.org Git - php/commitdiff
Remove some old code.
authorWez Furlong <wez@php.net>
Sun, 13 Oct 2002 23:43:46 +0000 (23:43 +0000)
committerWez Furlong <wez@php.net>
Sun, 13 Oct 2002 23:43:46 +0000 (23:43 +0000)
main/streams.c

index 6198ca8321aec1f1b6d4bf5795f57315d300b91d..177e78ba2b80333fe980bddc67a9798ae21c7ac7 100755 (executable)
@@ -544,7 +544,7 @@ PHPAPI size_t _php_stream_read(php_stream *stream, char *buf, size_t size TSRMLS
                        if (toread > size)
                                toread = size;
 
-                       if (toread) {
+                       if (toread > 0) {
                                memcpy(buf, stream->readbuf + stream->readpos, toread);
                                stream->readpos += toread;
                        }
@@ -572,14 +572,6 @@ PHPAPI int _php_stream_eof(php_stream *stream TSRMLS_DC)
                return 0;
 
        return stream->eof;
-       
-       /* we define our stream reading function so that it
-          must return EOF when an EOF condition occurs, when
-          working in unbuffered mode and called with these args */
-       if (stream->filterhead)
-               return stream->filterhead->fops->eof(stream, stream->filterhead TSRMLS_CC);
-       
-       return stream->ops->read(stream, NULL, 0 TSRMLS_CC) == EOF ? 1 : 0;
 }
 
 PHPAPI int _php_stream_putc(php_stream *stream, int c TSRMLS_DC)