]> granicus.if.org Git - php/commitdiff
Fixed variable re-declaration
authorIlia Alshanetsky <iliaa@php.net>
Thu, 13 Jan 2011 12:56:28 +0000 (12:56 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 13 Jan 2011 12:56:28 +0000 (12:56 +0000)
main/streams/cast.c

index 9f5898c47c1bc4cfbecfacbe0a782f9ebf17dd52..6c3854b9341ee0f58d415b731b2dd2abf26bb62c 100644 (file)
@@ -271,7 +271,7 @@ PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show
 
                        newstream = php_stream_fopen_tmpfile();
                        if (newstream) {
-                               int ret = php_stream_copy_to_stream_ex(stream, newstream, PHP_STREAM_COPY_ALL, NULL);
+                               int retval = php_stream_copy_to_stream_ex(stream, newstream, PHP_STREAM_COPY_ALL, NULL);
 
                                if (ret != SUCCESS) {
                                        php_stream_close(newstream);
@@ -279,7 +279,7 @@ PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show
                                        int retcode = php_stream_cast(newstream, castas | flags, (void **)ret, show_err);
 
                                        if (retcode == SUCCESS) {
-                                               rewind(*(FILE**)ret);
+                                               rewind(*(FILE**)retval);
                                        }
 
                                        /* do some specialized cleanup */