summaryrefslogtreecommitdiff
path: root/ext/zip
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2006-11-28 01:31:53 +0000
committerPierre Joye <pajoye@php.net>2006-11-28 01:31:53 +0000
commita70264892b2a8a5d357561e7e8f2dd464e51c033 (patch)
tree184143aee78d283ce80b3d0e18c25db4b94ae23e /ext/zip
parent34b55f20129e947d53d252f7ba22392d2e5be778 (diff)
downloadphp-git-a70264892b2a8a5d357561e7e8f2dd464e51c033.tar.gz
- fix warning
- addEmptyDir returns true on success - remove useless semi column
Diffstat (limited to 'ext/zip')
-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 b7591b81d2..aca65f1d16 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -122,7 +122,7 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file TSRMLS_D
len = spprintf(&file_dirname_fullpath, 0, "%s", dest);
}
- php_basename(file, file_len, NULL, 0, &file_basename, &file_basename_len TSRMLS_CC);
+ php_basename(file, file_len, NULL, 0, &file_basename, (int *)&file_basename_len TSRMLS_CC);
if (SAFEMODE_CHECKFILE(file_dirname_fullpath)) {
efree(file_dirname_fullpath);
@@ -954,7 +954,7 @@ static ZIPARCHIVE_METHOD(close)
/* {{{ proto bool createEmptyDir(string dirname) U
Returns the index of the entry named filename in the archive */
-ZIPARCHIVE_METHOD(addEmptyDir)
+static ZIPARCHIVE_METHOD(addEmptyDir)
{
struct zip *intern;
zval *this = getThis();
@@ -978,6 +978,7 @@ ZIPARCHIVE_METHOD(addEmptyDir)
if (zip_add_dir(intern, (const char *)dirname) < 0) {
RETURN_FALSE;
}
+ RETURN_TRUE;
}
/* }}} */
@@ -1004,7 +1005,6 @@ static ZIPARCHIVE_METHOD(addFile)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sll",
&filename, &filename_len, &entry_name, &entry_name_len, &offset_start, &offset_len) == FAILURE) {
- WRONG_PARAM_COUNT;
return;
}
@@ -1375,7 +1375,7 @@ static ZIPARCHIVE_METHOD(getCommentName)
ZIP_FROM_OBJECT(intern, this);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l",
- &name, &name_len, &flags) == FAILURE) {;
+ &name, &name_len, &flags) == FAILURE) {
return;
}
if (name_len < 1) {