summaryrefslogtreecommitdiffstats
path: root/minzip/Hash.c
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-08-06 03:00:04 +0200
committerTianjie Xu <xunchang@google.com>2016-09-01 19:43:14 +0200
commit747781433fb01f745529c7e9dd97c5599070ad0d (patch)
tree00eaba2e25fd5e2e8091cd456cae9b39ac880831 /minzip/Hash.c
parentMerge "minadbd: rename adb_server_main to minadbd_main." am: 818394869d am: aad4cef0f3 am: a331d85806 (diff)
downloadandroid_bootable_recovery-747781433fb01f745529c7e9dd97c5599070ad0d.tar
android_bootable_recovery-747781433fb01f745529c7e9dd97c5599070ad0d.tar.gz
android_bootable_recovery-747781433fb01f745529c7e9dd97c5599070ad0d.tar.bz2
android_bootable_recovery-747781433fb01f745529c7e9dd97c5599070ad0d.tar.lz
android_bootable_recovery-747781433fb01f745529c7e9dd97c5599070ad0d.tar.xz
android_bootable_recovery-747781433fb01f745529c7e9dd97c5599070ad0d.tar.zst
android_bootable_recovery-747781433fb01f745529c7e9dd97c5599070ad0d.zip
Diffstat (limited to '')
-rw-r--r--minzip/Hash.cpp (renamed from minzip/Hash.c)13
1 files changed, 6 insertions, 7 deletions
diff --git a/minzip/Hash.c b/minzip/Hash.cpp
index 49bcb3161..ac08935d4 100644
--- a/minzip/Hash.c
+++ b/minzip/Hash.cpp
@@ -8,8 +8,8 @@
#include <stdlib.h>
#include <assert.h>
-#define LOG_TAG "minzip"
-#include "Log.h"
+#include <android-base/logging.h>
+
#include "Hash.h"
/* table load factor, i.e. how full can it get before we resize */
@@ -220,8 +220,7 @@ void* mzHashTableLookup(HashTable* pHashTable, unsigned int itemHash, void* item
{
if (!resizeHash(pHashTable, pHashTable->tableSize * 2)) {
/* don't really have a way to indicate failure */
- LOGE("Dalvik hash resize failure\n");
- abort();
+ LOG(FATAL) << "Hash resize failure";
}
/* note "pEntry" is now invalid */
}
@@ -373,7 +372,7 @@ void mzHashTableProbeCount(HashTable* pHashTable, HashCalcFunc calcFunc,
totalProbe += count;
}
- LOGV("Probe: min=%d max=%d, total=%d in %d (%d), avg=%.3f\n",
- minProbe, maxProbe, totalProbe, numEntries, pHashTable->tableSize,
- (float) totalProbe / (float) numEntries);
+ LOG(VERBOSE) << "Probe: min=" << minProbe << ", max=" << maxProbe << ", total="
+ << totalProbe <<" in " << numEntries << " (" << pHashTable->tableSize
+ << "), avg=" << (float) totalProbe / (float) numEntries;
}