summaryrefslogtreecommitdiffstats
path: root/minzip
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2015-02-08 16:20:50 +0100
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-08 16:20:50 +0100
commitec5c1c1e291062576925b80b532d36df118103f5 (patch)
treea329cbb5c46df853065a18d54b5c2f24fdb22e2e /minzip
parentam 6a0d2fbc: Merge "There\'s no GPL code in \'updater\'." (diff)
parentMerge "Remove dead/unused code and realign some of the comments to make it more cleaner and easier to read" (diff)
downloadandroid_bootable_recovery-ec5c1c1e291062576925b80b532d36df118103f5.tar
android_bootable_recovery-ec5c1c1e291062576925b80b532d36df118103f5.tar.gz
android_bootable_recovery-ec5c1c1e291062576925b80b532d36df118103f5.tar.bz2
android_bootable_recovery-ec5c1c1e291062576925b80b532d36df118103f5.tar.lz
android_bootable_recovery-ec5c1c1e291062576925b80b532d36df118103f5.tar.xz
android_bootable_recovery-ec5c1c1e291062576925b80b532d36df118103f5.tar.zst
android_bootable_recovery-ec5c1c1e291062576925b80b532d36df118103f5.zip
Diffstat (limited to 'minzip')
-rw-r--r--minzip/DirUtil.c4
-rw-r--r--minzip/Hash.c11
-rw-r--r--minzip/Zip.c16
3 files changed, 8 insertions, 23 deletions
diff --git a/minzip/DirUtil.c b/minzip/DirUtil.c
index fe2c880ac..97cb2e0ee 100644
--- a/minzip/DirUtil.c
+++ b/minzip/DirUtil.c
@@ -85,7 +85,7 @@ dirCreateHierarchy(const char *path, int mode,
c--;
}
if (c == cpath) {
-//xxx test this path
+ //xxx test this path
/* No directory component. Act like the path was empty.
*/
errno = ENOENT;
@@ -206,7 +206,7 @@ dirUnlinkHierarchy(const char *path)
/* recurse over components */
errno = 0;
while ((de = readdir(dir)) != NULL) {
-//TODO: don't blow the stack
+ //TODO: don't blow the stack
char dn[PATH_MAX];
if (!strcmp(de->d_name, "..") || !strcmp(de->d_name, ".")) {
continue;
diff --git a/minzip/Hash.c b/minzip/Hash.c
index 8c6ca9bc2..8f8ed68e5 100644
--- a/minzip/Hash.c
+++ b/minzip/Hash.c
@@ -140,7 +140,6 @@ static bool resizeHash(HashTable* pHashTable, int newSize)
int i;
assert(countTombStones(pHashTable) == pHashTable->numDeadEntries);
- //LOGI("before: dead=%d\n", pHashTable->numDeadEntries);
pNewEntries = (HashEntry*) calloc(newSize, sizeof(HashTable));
if (pNewEntries == NULL)
@@ -196,7 +195,6 @@ void* mzHashTableLookup(HashTable* pHashTable, unsigned int itemHash, void* item
(*cmpFunc)(pEntry->data, item) == 0)
{
/* match */
- //LOGD("+++ match on entry %d\n", pEntry - pHashTable->pEntries);
break;
}
@@ -206,8 +204,6 @@ void* mzHashTableLookup(HashTable* pHashTable, unsigned int itemHash, void* item
break; /* edge case - single-entry table */
pEntry = pHashTable->pEntries;
}
-
- //LOGI("+++ look probing %d...\n", pEntry - pHashTable->pEntries);
}
if (pEntry->data == NULL) {
@@ -228,10 +224,6 @@ void* mzHashTableLookup(HashTable* pHashTable, unsigned int itemHash, void* item
abort();
}
/* note "pEntry" is now invalid */
- } else {
- //LOGW("okay %d/%d/%d\n",
- // pHashTable->numEntries, pHashTable->tableSize,
- // (pHashTable->tableSize * LOAD_NUMER) / LOAD_DENOM);
}
/* full table is bad -- search for nonexistent never halts */
@@ -264,7 +256,6 @@ bool mzHashTableRemove(HashTable* pHashTable, unsigned int itemHash, void* item)
pEnd = &pHashTable->pEntries[pHashTable->tableSize];
while (pEntry->data != NULL) {
if (pEntry->data == item) {
- //LOGI("+++ stepping on entry %d\n", pEntry - pHashTable->pEntries);
pEntry->data = HASH_TOMBSTONE;
pHashTable->numEntries--;
pHashTable->numDeadEntries++;
@@ -277,8 +268,6 @@ bool mzHashTableRemove(HashTable* pHashTable, unsigned int itemHash, void* item)
break; /* edge case - single-entry table */
pEntry = pHashTable->pEntries;
}
-
- //LOGI("+++ del probing %d...\n", pEntry - pHashTable->pEntries);
}
return false;
diff --git a/minzip/Zip.c b/minzip/Zip.c
index 70aff00cd..579e5319f 100644
--- a/minzip/Zip.c
+++ b/minzip/Zip.c
@@ -327,10 +327,6 @@ static bool parseZipArchive(ZipArchive* pArchive)
#else
pEntry = &pArchive->pEntries[i];
#endif
-
- //LOGI("%d: localHdr=%d fnl=%d el=%d cl=%d\n",
- // i, localHdrOffset, fileNameLen, extraLen, commentLen);
-
pEntry->fileNameLen = fileNameLen;
pEntry->fileName = fileName;
@@ -923,8 +919,8 @@ bool mzExtractRecursive(const ZipArchive *pArchive,
/* Walk through the entries and extract anything whose path begins
* with zpath.
-//TODO: since the entries are sorted, binary search for the first match
-// and stop after the first non-match.
+ //TODO: since the entries are sorted, binary search for the first match
+ // and stop after the first non-match.
*/
unsigned int i;
bool seenMatch = false;
@@ -933,10 +929,10 @@ bool mzExtractRecursive(const ZipArchive *pArchive,
for (i = 0; i < pArchive->numEntries; i++) {
ZipEntry *pEntry = pArchive->pEntries + i;
if (pEntry->fileNameLen < zipDirLen) {
-//TODO: look out for a single empty directory entry that matches zpath, but
-// missing the trailing slash. Most zip files seem to include
-// the trailing slash, but I think it's legal to leave it off.
-// e.g., zpath "a/b/", entry "a/b", with no children of the entry.
+ //TODO: look out for a single empty directory entry that matches zpath, but
+ // missing the trailing slash. Most zip files seem to include
+ // the trailing slash, but I think it's legal to leave it off.
+ // e.g., zpath "a/b/", entry "a/b", with no children of the entry.
/* No chance of matching.
*/
#if SORT_ENTRIES