]> granicus.if.org Git - php/commitdiff
- Fix two warnings
authorMarcus Boerger <helly@php.net>
Thu, 12 Jan 2006 19:21:36 +0000 (19:21 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 12 Jan 2006 19:21:36 +0000 (19:21 +0000)
# Here fixing warnings reveals that it often enough means fixing errors

main/streams/filter.c

index d9c002391abe874f5c55c9df8a5b84c72890fe49..dc9f8af8552e257b78785a13718529a59c7ace9b 100644 (file)
@@ -251,7 +251,7 @@ PHPAPI void php_stream_bucket_delref(php_stream_bucket *bucket TSRMLS_DC)
 {
        if (--bucket->refcount == 0) {
                if (bucket->own_buf) {
-                       pefree(bucket->is_unicode ? bucket->buf.ustr.val : bucket->buf.str.val, bucket->is_persistent);
+                       pefree(bucket->is_unicode ? (char*)bucket->buf.ustr.val : bucket->buf.str.val, bucket->is_persistent);
                }
                pefree(bucket, bucket->is_persistent);
        }
@@ -496,7 +496,7 @@ PHPAPI int _php_stream_filter_output_prefer_unicode(php_stream_filter *filter TS
        php_stream_filter_chain *chain = filter->chain;
        php_stream_filter *f;
        int inverted = 0;
-       int preferred = (chain = &chain->stream->readfilters ? 1 : 0);
+       int preferred = (chain == &chain->stream->readfilters ? 1 : 0);
 
        for (f = filter->next; f ; f = f->next) {
                if ((f->fops->flags & PSFO_FLAG_ACCEPTS_STRING) == 0) {