VirtualBox

Changeset 37026 in vbox


Ignore:
Timestamp:
May 10, 2011 12:19:55 PM (13 years ago)
Author:
vboxsync
Message:

SSM: pointers aren't UL everywhere.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/SSM.cpp

    r36912 r37026  
    62946294DECLINLINE(int) ssmR3GetHCPtrNI(PSSMHANDLE pSSM, void **ppv, uint32_t fFlags)
    62956295{
    6296     int rc;
     6296    uintptr_t uPtrNI;
    62976297    if (fFlags & SSMSTRUCT_FLAGS_DONT_IGNORE)
    62986298    {
     
    63006300        {
    63016301            uint64_t u;
    6302             rc = ssmR3DataRead(pSSM, &u, sizeof(u));
    6303             if (RT_SUCCESS(rc))
    6304                 *ppv = (void *)(u ? 1UL : 0UL);
     6302            int rc = ssmR3DataRead(pSSM, &u, sizeof(u));
     6303            if (RT_FAILURE(rc))
     6304                return rc;
     6305            uPtrNI = u ? 1 : 0;
    63056306        }
    63066307        else
    63076308        {
    63086309            uint32_t u;
    6309             rc = ssmR3DataRead(pSSM, &u, sizeof(u));
    6310             if (RT_SUCCESS(rc))
    6311                 *ppv = (void *)(u ? 1UL : 0UL);
     6310            int rc = ssmR3DataRead(pSSM, &u, sizeof(u));
     6311            if (RT_FAILURE(rc))
     6312                return rc;
     6313            uPtrNI = u ? 1 : 0;
    63126314        }
    63136315    }
     
    63156317    {
    63166318        bool f;
    6317         rc = SSMR3GetBool(pSSM, &f);
    6318         if (RT_SUCCESS(rc))
    6319             *ppv = (void *)(f ? 1UL : 0UL);
    6320     }
    6321     return rc;
     6319        int rc = SSMR3GetBool(pSSM, &f);
     6320        if (RT_FAILURE(rc))
     6321            return rc;
     6322        uPtrNI = f ? 1 : 0;
     6323    }
     6324    *ppv = (void *)uPtrNI;
     6325    return VINF_SUCCESS;
    63226326}
    63236327
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette