diff options
author | Tianjie Xu <xunchang@google.com> | 2016-09-02 01:04:37 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-09-02 01:04:37 +0200 |
commit | 61590bbf0d140ffa071eb14b17ae4c3dbc2be5ca (patch) | |
tree | b2d7cdcf7b401978c739d0449c76f92982d918a8 /minzip/Hash.cpp | |
parent | Merge "Check an edge case when read(2) returns 0" (diff) | |
parent | Switch recovery to libbase logging (diff) | |
download | android_bootable_recovery-61590bbf0d140ffa071eb14b17ae4c3dbc2be5ca.tar android_bootable_recovery-61590bbf0d140ffa071eb14b17ae4c3dbc2be5ca.tar.gz android_bootable_recovery-61590bbf0d140ffa071eb14b17ae4c3dbc2be5ca.tar.bz2 android_bootable_recovery-61590bbf0d140ffa071eb14b17ae4c3dbc2be5ca.tar.lz android_bootable_recovery-61590bbf0d140ffa071eb14b17ae4c3dbc2be5ca.tar.xz android_bootable_recovery-61590bbf0d140ffa071eb14b17ae4c3dbc2be5ca.tar.zst android_bootable_recovery-61590bbf0d140ffa071eb14b17ae4c3dbc2be5ca.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; } |