tony2001                Fri Aug 12 19:21:30 2005 EDT

  Modified files:              
    /php-src/main/streams       streams.c 
  Log:
  make valgrind and gcc happy
  
  
http://cvs.php.net/diff.php/php-src/main/streams/streams.c?r1=1.83&r2=1.84&ty=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.83 php-src/main/streams/streams.c:1.84
--- php-src/main/streams/streams.c:1.83 Thu Aug 11 19:36:06 2005
+++ php-src/main/streams/streams.c      Fri Aug 12 19:21:29 2005
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: streams.c,v 1.83 2005/08/11 23:36:06 andrei Exp $ */
+/* $Id: streams.c,v 1.84 2005/08/12 23:21:29 tony2001 Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -2379,7 +2379,7 @@
        if (wrapper) {
 
                stream = wrapper->wops->stream_opener(wrapper,
-                               path_to_open, implicit_mode, options ^ 
REPORT_ERRORS,
+                               path_to_open, (char *)implicit_mode, options ^ 
REPORT_ERRORS,
                                opened_path, context STREAMS_REL_CC TSRMLS_CC);
 
                /* if the caller asked for a persistent stream but the wrapper 
did not
@@ -2441,7 +2441,7 @@
        }
 
        /* Output encoding on text mode streams defaults to utf8 unless 
specified in context parameter */
-       if (stream && strchr(implicit_mode, 't') && (strchr(implicit_mode, 'w') 
|| strchr(implicit_mode, 'a') || strchr(implicit_mode, '+'))) {
+       if (stream && memchr(implicit_mode, 't', modelen) && 
(memchr(implicit_mode, 'w', modelen) || memchr(implicit_mode, 'a', modelen) || 
memchr(implicit_mode, '+', modelen))) {
                php_stream_filter *filter;
                char *encoding = (context && context->output_encoding) ? 
context->output_encoding : "utf8";
                char *filtername;
@@ -2460,7 +2460,7 @@
                efree(filtername);
        }
 
-       if (stream && strchr(implicit_mode, 't') && (strchr(implicit_mode, 'r') 
|| strchr(implicit_mode, '+'))) {
+       if (stream && memchr(implicit_mode, 't', modelen) && 
(memchr(implicit_mode, 'r', modelen) || memchr(implicit_mode, '+', modelen))) {
                php_stream_filter *filter;
                char *filtername;
                char *encoding = (context && context->input_encoding) ? 
context->input_encoding : "utf8";

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

Reply via email to