From da0feb9dcd582bbdae07a561c36ca61cdba7d758 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Wed, 6 Sep 2006 15:13:16 +0000 Subject: [PATCH] fix a few more zend_parse_parameters() issues --- ext/zip/php_zip.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 975b250e01..183fe308c5 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -597,7 +597,7 @@ PHP_FUNCTION(zip_open) zip_rsrc *rsrc_int; int err = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &filename, &filename_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { return; } @@ -643,7 +643,7 @@ PHP_FUNCTION(zip_read) long flags = 0; zip_rsrc *rsrc_int; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &zip_dp, flags) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &zip_dp, &flags) == FAILURE) { return; } ZEND_FETCH_RESOURCE(rsrc_int, zip_rsrc *, &zip_dp, -1, le_zip_dir_name, le_zip_dir); @@ -1205,7 +1205,7 @@ ZIPARCHIVE_METHOD(setArchiveComment) { struct zip *intern; zval *this = getThis(); - long comment_len = 0; + int comment_len; char * comment; if (!this) { @@ -1258,7 +1258,7 @@ ZIPARCHIVE_METHOD(setCommentName) { struct zip *intern; zval *this = getThis(); - long comment_len = 0, name_len = 0; + int comment_len, name_len; char * comment, *name; struct zip_stat sb; @@ -1286,7 +1286,8 @@ ZIPARCHIVE_METHOD(setCommentIndex) { struct zip *intern; zval *this = getThis(); - long index, comment_len = 0; + long index + int comment_len; char * comment; struct zip_stat sb; @@ -1313,7 +1314,8 @@ ZIPARCHIVE_METHOD(getCommentName) { struct zip *intern; zval *this = getThis(); - long name_len = 0, flags = 0; + int name_len; + long flags = 0; int comment_len = 0; const char * comment; char *name; @@ -1403,8 +1405,8 @@ ZIPARCHIVE_METHOD(deleteName) { struct zip *intern; zval *this = getThis(); - long name_len = 0; - char *name; + int name_len; + char *name; struct zip_stat sb; if (!this) { -- 2.50.1