summaryrefslogtreecommitdiff
path: root/ext/zip/php_zip.c
diff options
context:
space:
mode:
authorArnaud Le Blanc <lbarnaud@php.net>2008-10-21 23:39:15 +0000
committerArnaud Le Blanc <lbarnaud@php.net>2008-10-21 23:39:15 +0000
commit1d5ba8bb21a1eefbaaf8f02625d00f37fb4b5b90 (patch)
treea88868e69d5ac42e21eaf918d6ba059220014f43 /ext/zip/php_zip.c
parentb2bc40f70c2e02c7fe81207e48f73b401946e8ae (diff)
downloadphp-git-1d5ba8bb21a1eefbaaf8f02625d00f37fb4b5b90.tar.gz
MFH: initialize optional vars
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r--ext/zip/php_zip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 79ac46df2b..40c0e0b7ce 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -1184,8 +1184,8 @@ static PHP_NAMED_FUNCTION(zif_zip_entry_open)
{
zval * zip;
zval * zip_entry;
- char *mode;
- int mode_len;
+ char *mode = NULL;
+ int mode_len = 0;
zip_read_rsrc * zr_rsrc;
zip_rsrc *z_rsrc;
@@ -1521,10 +1521,10 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /*
struct zip *intern;
zval *this = getThis();
char *pattern;
- char *path;
+ char *path = NULL;
char *remove_path = NULL;
char *add_path = NULL;
- int pattern_len, add_path_len, remove_path_len, path_len;
+ int pattern_len, add_path_len, remove_path_len, path_len = 0;
long remove_all_path = 0;
long flags = 0;
zval *options = NULL;