jani            Wed Oct 10 12:58:42 2007 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/standard       streamsfuncs.c 
  Log:
  MFH
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.6.2.15.2.3&r2=1.58.2.6.2.15.2.4&diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.3 
php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.4
--- php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.3       Wed Oct 10 
12:44:46 2007
+++ php-src/ext/standard/streamsfuncs.c Wed Oct 10 12:58:41 2007
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.3 2007/10/10 12:44:46 jani Exp $ */
+/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.4 2007/10/10 12:58:41 jani Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -574,6 +574,7 @@
        zval **elem;
        php_stream *stream;
        php_socket_t this_fd;
+       int cnt = 0;
 
        if (Z_TYPE_P(stream_array) != IS_ARRAY) {
                return 0;
@@ -598,9 +599,10 @@
                        if (this_fd > *max_fd) {
                                *max_fd = this_fd;
                        }
+                       cnt++;
                }
        }
-       return 1;
+       return cnt ? 1 : 0;
 }
 
 static int stream_array_from_fd_set(zval *stream_array, fd_set *fds TSRMLS_DC)
@@ -608,7 +610,8 @@
        zval **elem, **dest_elem;
        php_stream *stream;
        HashTable *new_hash;
-       php_socket_t this_fd, ret = 0;
+       php_socket_t this_fd;
+       int ret = 0;
 
        if (Z_TYPE_P(stream_array) != IS_ARRAY) {
                return 0;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to