VirtualBox

Changeset 52863 in vbox


Ignore:
Timestamp:
Sep 25, 2014 1:03:51 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96282
Message:

DevACPI: cosmetic changes (use local variables if possible)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevACPI.cpp

    r52613 r52863  
    32003200
    32013201    char *pszOemId = NULL;
    3202     rc = CFGMR3QueryStringAllocDef(pThis->pDevInsR3->pCfg, "AcpiOemId", &pszOemId, "VBOX  ");
    3203     if (RT_FAILURE(rc))
    3204         return PDMDEV_SET_ERROR(pThis->pDevInsR3, rc,
     3202    rc = CFGMR3QueryStringAllocDef(pCfg, "AcpiOemId", &pszOemId, "VBOX  ");
     3203    if (RT_FAILURE(rc))
     3204        return PDMDEV_SET_ERROR(pDevIns, rc,
    32053205                                N_("Configuration error: Querying \"AcpiOemId\" as string failed"));
    32063206    size_t cbOemId = strlen(pszOemId);
    32073207    if (cbOemId > 6)
    3208         return PDMDEV_SET_ERROR(pThis->pDevInsR3, rc,
     3208        return PDMDEV_SET_ERROR(pDevIns, rc,
    32093209                                N_("Configuration error: \"AcpiOemId\" must contain not more than 6 characters"));
    32103210    memset(pThis->au8OemId, ' ', sizeof(pThis->au8OemId));
     
    32133213
    32143214    char *pszCreatorId = NULL;
    3215     rc = CFGMR3QueryStringAllocDef(pThis->pDevInsR3->pCfg, "AcpiCreatorId", &pszCreatorId, "ASL ");
    3216     if (RT_FAILURE(rc))
    3217         return PDMDEV_SET_ERROR(pThis->pDevInsR3, rc,
     3215    rc = CFGMR3QueryStringAllocDef(pCfg, "AcpiCreatorId", &pszCreatorId, "ASL ");
     3216    if (RT_FAILURE(rc))
     3217        return PDMDEV_SET_ERROR(pDevIns, rc,
    32183218                                N_("Configuration error: Querying \"AcpiCreatorId\" as string failed"));
    32193219    size_t cbCreatorId = strlen(pszCreatorId);
    32203220    if (cbCreatorId > 4)
    3221         return PDMDEV_SET_ERROR(pThis->pDevInsR3, rc,
     3221        return PDMDEV_SET_ERROR(pDevIns, rc,
    32223222                                N_("Configuration error: \"AcpiCreatorId\" must contain not more than 4 characters"));
    32233223    memset(pThis->au8CreatorId, ' ', sizeof(pThis->au8CreatorId));
     
    32253225    MMR3HeapFree(pszCreatorId);
    32263226
    3227     rc = CFGMR3QueryU32Def(pThis->pDevInsR3->pCfg, "AcpiCreatorRev", &pThis->u32CreatorRev, RT_H2LE_U32(0x61));
    3228     if (RT_FAILURE(rc))
    3229         return PDMDEV_SET_ERROR(pThis->pDevInsR3, rc,
     3227    rc = CFGMR3QueryU32Def(pCfg, "AcpiCreatorRev", &pThis->u32CreatorRev, RT_H2LE_U32(0x61));
     3228    if (RT_FAILURE(rc))
     3229        return PDMDEV_SET_ERROR(pDevIns, rc,
    32303230                                N_("Configuration error: Querying \"AcpiCreatorRev\" as integer failed"));
    32313231    pThis->u32OemRevision         = RT_H2LE_U32(0x1);
     
    32353235     */
    32363236    char *pszCustBinFile;
    3237     rc = CFGMR3QueryStringAlloc(pThis->pDevInsR3->pCfg, "CustomTable", &pszCustBinFile);
     3237    rc = CFGMR3QueryStringAlloc(pCfg, "CustomTable", &pszCustBinFile);
    32383238    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    3239         rc = CFGMR3QueryStringAlloc(pThis->pDevInsR3->pCfg, "SLICTable", &pszCustBinFile);
     3239        rc = CFGMR3QueryStringAlloc(pCfg, "SLICTable", &pszCustBinFile);
    32403240    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    32413241    {
     
    32443244    }
    32453245    else if (RT_FAILURE(rc))
    3246         return PDMDEV_SET_ERROR(pThis->pDevInsR3, rc,
     3246        return PDMDEV_SET_ERROR(pDevIns, rc,
    32473247                                N_("Configuration error: Querying \"CustomTable\" as a string failed"));
    32483248    else if (!*pszCustBinFile)
     
    32733273                 * Allocate buffer for the custom table binary data.
    32743274                 */
    3275                 pThis->pu8CustBin = (uint8_t *)PDMDevHlpMMHeapAlloc(pThis->pDevInsR3, pThis->cbCustBin);
     3275                pThis->pu8CustBin = (uint8_t *)PDMDevHlpMMHeapAlloc(pDevIns, pThis->cbCustBin);
    32763276                if (pThis->pu8CustBin)
    32773277                {
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