diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-08-29 10:36:58 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-08-29 10:36:58 +0400 |
commit | ac19054b5825e461e468af015cb315a4f3714354 (patch) | |
tree | 829bfde30351d488746f83fd521be44758006cba /ext/zip/lib/zip_source_error.c | |
parent | af1225d692046f86b2a636b06bf7ebccfde45201 (diff) | |
parent | 4eb6c8234dd6085e3c96a5ebca86b1d70ac481e3 (diff) | |
download | php-ac19054b5825e461e468af015cb315a4f3714354.tar.gz |
Merge branch 'master-5.6' of git://anonscm.debian.org/pkg-php/php
Conflicts:
debian/changelog
debian/control
debian/patches/series
debian/php5-fpm.logrotate
debian/rules
Diffstat (limited to 'ext/zip/lib/zip_source_error.c')
-rw-r--r-- | ext/zip/lib/zip_source_error.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/ext/zip/lib/zip_source_error.c b/ext/zip/lib/zip_source_error.c index 70ec8bc5d..f6f802c85 100644 --- a/ext/zip/lib/zip_source_error.c +++ b/ext/zip/lib/zip_source_error.c @@ -1,6 +1,6 @@ /* zip_source_error.c -- get last error from zip_source - Copyright (C) 2009 Dieter Baron and Thomas Klausner + Copyright (C) 2009-2014 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <libzip@nih.at> @@ -37,24 +37,21 @@ -ZIP_EXTERN(void) +void zip_source_error(struct zip_source *src, int *ze, int *se) { - int e[2] = { 0, 0 }; + int e[2]; if (src->src == NULL) { + if (src->cb.f(src->ud, e, sizeof(e), ZIP_SOURCE_ERROR) < 0) { + e[0] = ZIP_ER_INTERNAL; + e[1] = 0; + } } else { switch (src->error_source) { case ZIP_LES_NONE: - if (src->src == NULL) { - if (src->cb.f(src->ud, e, sizeof(e), ZIP_SOURCE_ERROR) < 0) { - e[0] = ZIP_ER_INTERNAL; - e[1] = 0; - } - } - else - e[0] = e[1] = 0; + e[0] = e[1] = 0; break; case ZIP_LES_INVAL: @@ -67,8 +64,7 @@ zip_source_error(struct zip_source *src, int *ze, int *se) return; case ZIP_LES_UPPER: - if (src->cb.l(src->src, src->ud, e, sizeof(e), - ZIP_SOURCE_ERROR) < 0) { + if (src->cb.l(src->src, src->ud, e, sizeof(e), ZIP_SOURCE_ERROR) < 0) { e[0] = ZIP_ER_INTERNAL; e[1] = 0; } @@ -77,6 +73,7 @@ zip_source_error(struct zip_source *src, int *ze, int *se) default: e[0] = ZIP_ER_INTERNAL; e[1] = 0; + break; } } |