com php-src: Fix a couple of warnings: ext/zip/php_zip.c
| From: | Rasmus Lerdorf | Date: | Sat, 21 Mar 2015 06:32:07 +0000 |
| Subject: | com php-src: Fix a couple of warnings: ext/zip/php_zip.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85738@lists.php.net to get a copy of this message | ||
Commit: 4d10e15845bfaf0987b5daa02f7fce745b9b287c
Author: Rasmus Lerdorf <rasmus@lerdorf.com> Fri, 20 Mar 2015 23:32:07 -0700
Parents: 595e46fdebbdce45a6a2662ea98e62639473223d
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4d10e15845bfaf0987b5daa02f7fce745b9b287c
Log:
Fix a couple of warnings
Changed paths:
M ext/zip/php_zip.c
Diff:
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 375df46..34b3733 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -956,7 +956,6 @@ static HashTable *php_zip_get_properties(zval *object)/* {{{ */
HashTable *props;
zip_prop_handler *hnd;
zend_string *key;
- zend_ulong num_key;
obj = Z_ZIP_P(object);
props = zend_std_get_properties(object);
@@ -965,7 +964,7 @@ static HashTable *php_zip_get_properties(zval *object)/* {{{ */
return NULL;
}
- ZEND_HASH_FOREACH_KEY_PTR(obj->prop_handler, num_key, key, hnd) {
+ ZEND_HASH_FOREACH_STR_KEY_PTR(obj->prop_handler, key, hnd) {
zval *ret, val;
ret = php_zip_property_reader(obj, hnd, &val);
if (ret == NULL) {
@@ -1627,7 +1626,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type)
/*
if (remove_path && remove_path_len > 1) {
size_t real_len = strlen(remove_path);
- if (real_len > 1 && remove_path[real_len - 1] == '/' || remove_path[real_len
- 1] == '\\') {
+ if ((real_len > 1) && ((remove_path[real_len - 1] == '/') ||
(remove_path[real_len - 1] == '\\'))) {
remove_path[real_len - 1] = '\0';
}
}