]> granicus.if.org Git - php/commitdiff
Simplify and enhance readability.
authorWez Furlong <wez@php.net>
Fri, 4 Apr 2003 08:57:40 +0000 (08:57 +0000)
committerWez Furlong <wez@php.net>
Fri, 4 Apr 2003 08:57:40 +0000 (08:57 +0000)
ext/standard/streamsfuncs.c

index 814cafd2bf32bf13a09437ab531eb72b110aaac2..d6e616cfe45f6f1a30915ec3c4d7d4695848de40 100644 (file)
@@ -351,12 +351,12 @@ PHP_FUNCTION(stream_get_transports)
 
        if (stream_xport_hash = php_stream_xport_get_hash()) {
                array_init(return_value);
-               for(zend_hash_internal_pointer_reset(stream_xport_hash);
-                       (key_flags = zend_hash_get_current_key_ex(stream_xport_hash, &stream_xport, &stream_xport_len, NULL, 0, NULL)) != HASH_KEY_NON_EXISTANT;
-                       zend_hash_move_forward(stream_xport_hash)) {
-                               if (key_flags == HASH_KEY_IS_STRING) {
-                                       add_next_index_stringl(return_value, stream_xport, stream_xport_len, 1);
-                               }
+               zend_hash_internal_pointer_reset(stream_xport_hash);
+               while (zend_hash_get_current_key_ex(stream_xport_hash,
+                                       &stream_xport, &stream_xport_len,
+                                       NULL, 0, NULL) == HASH_KEY_IS_STRING) {
+                       add_next_index_stringl(return_value, stream_xport, stream_xport_len, 1);
+                       zend_hash_move_forward(stream_xport_hash);
                }
        } else {
                RETURN_FALSE;