]> granicus.if.org Git - php/commitdiff
Untested. Killing remaining warnings under MacOSX (thanks again Philip).
authorSteph Fox <sfox@php.net>
Sat, 1 Mar 2008 21:44:32 +0000 (21:44 +0000)
committerSteph Fox <sfox@php.net>
Sat, 1 Mar 2008 21:44:32 +0000 (21:44 +0000)
ext/phar/util.c

index 304f0c115e51d2ba18e842bfc52f2fb3bc904454..5eee45b511e2bb15a2c36525ec15cfac7f5404f2 100644 (file)
@@ -642,7 +642,6 @@ int phar_create_writeable_entry(phar_archive_data *phar, phar_entry_info *entry,
                        } else if (php_stream_is(*(php_stream**)entry->fp->abstract, PHP_STREAM_IS_STDIO)) {
                                php_stream_truncate_set_size(*(php_stream**)entry->fp->abstract, 0);
                        } else {
-                               *ret = NULL;
                                if (error) {
                                        spprintf(error, 0, "phar error: file \"%s\" cannot be opened for writing, no truncate support", phar->fname);
                                }
@@ -651,10 +650,8 @@ int phar_create_writeable_entry(phar_archive_data *phar, phar_entry_info *entry,
                } else if (php_stream_is(entry->fp, PHP_STREAM_IS_STDIO)) {
                        php_stream_truncate_set_size(entry->fp, 0);
                } else {
-                       efree(*ret);
-                       *ret = NULL;
                        if (error) {
-                               spprintf(error, 0, "phar error: file \"%s\" cannot be opened for writing, no truncate support", fname);
+                               spprintf(error, 0, "phar error: file \"%s\" cannot be opened for writing, no truncate support", phar->fname);
                        }
                        return FAILURE;
                }