From: Steph Fox Date: Sat, 1 Mar 2008 21:44:32 +0000 (+0000) Subject: Untested. Killing remaining warnings under MacOSX (thanks again Philip). X-Git-Tag: RELEASE_2_0_0a1~281 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66d3abac02e5f9b69b8cd7c417bcd880125a9233;p=php Untested. Killing remaining warnings under MacOSX (thanks again Philip). --- diff --git a/ext/phar/util.c b/ext/phar/util.c index 304f0c115e..5eee45b511 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -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; }