Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8e5dc54 authored by Andrew Hsieh's avatar Andrew Hsieh Committed by Alex Ray
Browse files

Fixed 64-bit porting issues

Fixed two issues about casting between int and pointer which
cause compilation error in 64-bit mode (eg. for 64-bit emulator)

Change-Id: I5ca9a933a239db73e56d6f27de05aa42bd06a650
parent 265743ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ ZipFileRO::~ZipFileRO() {
 */
int ZipFileRO::entryToIndex(const ZipEntryRO entry) const
{
    long ent = ((long) entry) - kZipEntryAdj;
    long ent = ((intptr_t) entry) - kZipEntryAdj;
    if (ent < 0 || ent >= mHashTableSize || mHashTable[ent].name == NULL) {
        ALOGW("Invalid ZipEntryRO %p (%ld)\n", entry, ent);
        return -1;
@@ -459,7 +459,7 @@ ZipEntryRO ZipFileRO::findEntryByIndex(int idx) const
    for (int ent = 0; ent < mHashTableSize; ent++) {
        if (mHashTable[ent].name != NULL) {
            if (idx-- == 0)
                return (ZipEntryRO) (ent + kZipEntryAdj);
                return (ZipEntryRO) (intptr_t)(ent + kZipEntryAdj);
        }
    }