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 23:32:55 +0200
commitc21edd46541a6e1c3b7de43aa6002ea45b90c64a (patch)
tree53763973ea3ef46540e4c1071c6f1f29378d8abd /minzip/Hash.c
parentMerge "Check an edge case when read(2) returns 0" am: 3202b8faf4 am: 852ae8d0fb (diff)
downloadandroid_bootable_recovery-c21edd46541a6e1c3b7de43aa6002ea45b90c64a.tar
android_bootable_recovery-c21edd46541a6e1c3b7de43aa6002ea45b90c64a.tar.gz
android_bootable_recovery-c21edd46541a6e1c3b7de43aa6002ea45b90c64a.tar.bz2
android_bootable_recovery-c21edd46541a6e1c3b7de43aa6002ea45b90c64a.tar.lz
android_bootable_recovery-c21edd46541a6e1c3b7de43aa6002ea45b90c64a.tar.xz
android_bootable_recovery-c21edd46541a6e1c3b7de43aa6002ea45b90c64a.tar.zst
android_bootable_recovery-c21edd46541a6e1c3b7de43aa6002ea45b90c64a.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;
}