tony2001                Mon May 29 10:42:10 2006 UTC

  Modified files:              
    /php-src/ext/standard       file.c 
  Log:
  initialize srcstream
  use different variable in local scope
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c?r1=1.443&r2=1.444&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.443 php-src/ext/standard/file.c:1.444
--- php-src/ext/standard/file.c:1.443   Mon May 29 10:23:53 2006
+++ php-src/ext/standard/file.c Mon May 29 10:42:10 2006
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: file.c,v 1.443 2006/05/29 10:23:53 tony2001 Exp $ */
+/* $Id: file.c,v 1.444 2006/05/29 10:42:10 tony2001 Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -588,7 +588,7 @@
        zval *zcontext = NULL;
        php_stream_context *context = NULL;
        char mode[3] = { 'w', 0, 0 };
-       php_stream *srcstream;
+       php_stream *srcstream = NULL;
        
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "tz/|lr!", 
&filename, &filename_len, &filename_type,
                                &data, &flags, &zcontext) == FAILURE) {
@@ -701,9 +701,9 @@
                                        php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Failed to write %d characters to %s", ustrlen, filename);
                                        numchars = -1;
                                } else if (numchars != ustrlen) {
-                                       int numchars = 
u_countChar32(Z_USTRVAL_P(data), numchars);
+                                       int written_numchars = 
u_countChar32(Z_USTRVAL_P(data), numchars);
 
-                                       php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Only %d of %d characters written, possibly out of free disk space", 
numchars, ustrlen);
+                                       php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Only %d of %d characters written, possibly out of free disk space", 
written_numchars, ustrlen);
                                        numchars = -1;
                                }
                        }

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

Reply via email to