summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2013-12-09 16:26:36 +0000
committerNarayan Kamath <narayan@google.com>2013-12-09 16:26:36 +0000
commiteb41ad212e125aa81f09df850e0c41e11ba96043 (patch)
tree0dfdc36b3a97269bdf0fdb0c5992188a77d79887
parenta2125077e104941f797f93fbe6bfad22ef60a1d8 (diff)
downloadsystem_core-eb41ad212e125aa81f09df850e0c41e11ba96043.zip
system_core-eb41ad212e125aa81f09df850e0c41e11ba96043.tar.gz
system_core-eb41ad212e125aa81f09df850e0c41e11ba96043.tar.bz2
Fix return code for ended iteration.
The API promises a return code of -1 for an ended iteration and lower negative values for errors. Change-Id: I688a1ee2efad1bdfc6959cf27e49c0426ebf27f8
-rw-r--r--libziparchive/zip_archive.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libziparchive/zip_archive.cc b/libziparchive/zip_archive.cc
index 83b7c5b..b63ac79 100644
--- a/libziparchive/zip_archive.cc
+++ b/libziparchive/zip_archive.cc
@@ -86,7 +86,7 @@ static const uint32_t kMaxErrorLen = 1024;
static const char* kErrorMessages[] = {
"Unknown return code.",
- "I/O Error",
+ "Iteration ended",
"Zlib error",
"Invalid file",
"Invalid handle",
@@ -96,13 +96,12 @@ static const char* kErrorMessages[] = {
"Invalid offset",
"Inconsistent information",
"Invalid entry name",
- "Iteration ended",
+ "I/O Error",
};
static const int32_t kErrorMessageUpperBound = 0;
-// An I/O related system call (read, lseek, ftruncate, map) failed.
-static const int32_t kIoError = -1;
+static const int32_t kIterationEnd = -1;
// We encountered a Zlib error when inflating a stream from this file.
// Usually indicates file corruption.
@@ -138,9 +137,10 @@ static const int32_t kInconsistentInformation = -9;
// An invalid entry name was encountered.
static const int32_t kInvalidEntryName = -10;
-static const int32_t kIterationEnd = -12;
+// An I/O related system call (read, lseek, ftruncate, map) failed.
+static const int32_t kIoError = -11;
-static const int32_t kErrorMessageLowerBound = -13;
+static const int32_t kErrorMessageLowerBound = -12;
#ifdef PAGE_SHIFT