]> granicus.if.org Git - php/commitdiff
- no need of assert here
authorPierre Joye <pajoye@php.net>
Thu, 20 Jan 2011 06:32:59 +0000 (06:32 +0000)
committerPierre Joye <pajoye@php.net>
Thu, 20 Jan 2011 06:32:59 +0000 (06:32 +0000)
main/streams/cast.c

index 6c3854b9341ee0f58d415b731b2dd2abf26bb62c..debbd82707492dbd242df4e156fe1e431b024ef7 100644 (file)
@@ -366,8 +366,9 @@ PHPAPI FILE * _php_stream_open_wrapper_as_file(char *path, char *mode, int optio
 /* {{{ php_stream_make_seekable */
 PHPAPI int _php_stream_make_seekable(php_stream *origstream, php_stream **newstream, int flags STREAMS_DC TSRMLS_DC)
 {
-       assert(newstream != NULL);
-
+       if (newstream == NULL) {
+               return PHP_STREAM_FAILED;
+       }
        *newstream = NULL;
 
        if (((flags & PHP_STREAM_FORCE_CONVERSION) == 0) && origstream->ops->seek != NULL) {