diff options
author | Christopher Tate <ctate@google.com> | 2010-07-29 14:04:07 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-07-29 14:04:07 -0700 |
commit | 1fdacef18d6491eab1b76e75bb315bb075a01a18 (patch) | |
tree | 4b3b7046dd58740e8f4744ba0be2c0291b00ebbc /libs/utils | |
parent | 2571356e560bd44b3f0d4e466210b50d4511d24d (diff) | |
parent | 06abd0a6a833beda1c0e68aed44912d145745a42 (diff) | |
download | frameworks_base-1fdacef18d6491eab1b76e75bb315bb075a01a18.zip frameworks_base-1fdacef18d6491eab1b76e75bb315bb075a01a18.tar.gz frameworks_base-1fdacef18d6491eab1b76e75bb315bb075a01a18.tar.bz2 |
am 06abd0a6: am 571180c4: Merge "Attempt to fix the SDK build" into gingerbread
Merge commit '06abd0a6a833beda1c0e68aed44912d145745a42'
* commit '06abd0a6a833beda1c0e68aed44912d145745a42':
Attempt to fix the SDK build
Diffstat (limited to 'libs/utils')
-rw-r--r-- | libs/utils/StreamingZipInflater.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/utils/StreamingZipInflater.cpp b/libs/utils/StreamingZipInflater.cpp index 4e05914..7ebde78 100644 --- a/libs/utils/StreamingZipInflater.cpp +++ b/libs/utils/StreamingZipInflater.cpp @@ -23,7 +23,7 @@ #include <stddef.h> #include <assert.h> -static inline size_t min(size_t a, size_t b) { return (a < b) ? a : b; } +static inline size_t min_of(size_t a, size_t b) { return (a < b) ? a : b; } using namespace android; @@ -116,10 +116,10 @@ void StreamingZipInflater::initInflateState() { ssize_t StreamingZipInflater::read(void* outBuf, size_t count) { uint8_t* dest = (uint8_t*) outBuf; size_t bytesRead = 0; - size_t toRead = min(count, size_t(mOutTotalSize - mOutCurPosition)); + size_t toRead = min_of(count, size_t(mOutTotalSize - mOutCurPosition)); while (toRead > 0) { // First, write from whatever we already have decoded and ready to go - size_t deliverable = min(toRead, mOutLastDecoded - mOutDeliverable); + size_t deliverable = min_of(toRead, mOutLastDecoded - mOutDeliverable); if (deliverable > 0) { if (outBuf != NULL) memcpy(dest, mOutBuf + mOutDeliverable, deliverable); mOutDeliverable += deliverable; @@ -188,7 +188,7 @@ int StreamingZipInflater::readNextChunk() { assert(mDataMap == NULL); if (mInNextChunkOffset < mInTotalSize) { - size_t toRead = min(mInBufSize, mInTotalSize - mInNextChunkOffset); + size_t toRead = min_of(mInBufSize, mInTotalSize - mInNextChunkOffset); if (toRead > 0) { ssize_t didRead = ::read(mFd, mInBuf, toRead); //LOGD("Reading input chunk, size %08x didread %08x", toRead, didRead); |