]> granicus.if.org Git - php/commitdiff
- use the same checks for zip_stat
authorPierre Joye <pajoye@php.net>
Sat, 19 May 2007 22:25:11 +0000 (22:25 +0000)
committerPierre Joye <pajoye@php.net>
Sat, 19 May 2007 22:25:11 +0000 (22:25 +0000)
ext/zip/php_zip.c

index 75ffeba106ccd521b91190a623b00489592b611d..c1ab3cc507337b57d92b52186063f61c4d4fbb83 100644 (file)
@@ -62,7 +62,7 @@ static int le_zip_entry;
                php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string as entry name"); \
                RETURN_FALSE; \
        } \
-       if (zip_stat(za, path, flags, &sb)) { \
+       if (zip_stat(za, path, flags, &sb) != 0) { \
                RETURN_FALSE; \
        }
 /* }}} */
@@ -103,7 +103,7 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil
        size_t file_basename_len;
        int is_dir_only = 0;
 
-       if (file_len >= MAXPATHLEN || zip_stat(za, file, 0, &sb)) {
+       if (file_len >= MAXPATHLEN || zip_stat(za, file, 0, &sb) != 0) {
                return 0;
        }
 
@@ -1879,7 +1879,7 @@ static ZIPARCHIVE_METHOD(getStream)
                return;
        }
 
-       if (zip_stat(intern, filename, 0, &sb)) {
+       if (zip_stat(intern, filename, 0, &sb) != 0) {
                RETURN_FALSE;
        }