VirtualBox

Changeset 87597 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Feb 4, 2021 12:05:03 AM (4 years ago)
Author:
vboxsync
Message:

VMM/DBGF: Eliminated some unnecessary variable initializations. (Some of the compiler will certainly tell you if you forget to initialize "rc" or any other variable, where-as it both looks totally wrong (to me at least) to assign a value to a variable which you do not use and you also risk not assigning it the correct value in some code path.) bugref:9837

File:
1 edited

Legend:

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

    r87346 r87597  
    13301330    {
    13311331        uint32_t u32Entry = ASMAtomicReadU32(&pUVM->dbgf.s.paBpLocL1R3[idxL1]);
    1332 
    13331332        if (u32Entry == DBGF_BP_INT3_L1_ENTRY_TYPE_NULL)
    13341333        {
     
    13441343        {
    13451344            rc = dbgfR3BpInt3L2BstNodeAdd(pUVM, idxL1, hBp, pBp->Pub.u.Int3.GCPtr);
    1346             if (rc == VINF_TRY_AGAIN)
    1347                 continue;
    1348 
    1349             break;
     1345            if (rc != VINF_TRY_AGAIN)
     1346                break;
    13501347        }
    13511348    }
     
    15631560static int dbgfR3BpArm(PUVM pUVM, DBGFBP hBp, PDBGFBPINT pBp)
    15641561{
    1565     int rc = VINF_SUCCESS;
     1562    int rc;
    15661563    PVM pVM = pUVM->pVM;
    15671564
     
    16371634static int dbgfR3BpDisarm(PUVM pUVM, DBGFBP hBp, PDBGFBPINT pBp)
    16381635{
    1639     int rc = VINF_SUCCESS;
     1636    int rc;
    16401637    PVM pVM = pUVM->pVM;
    16411638
     
    22292226    AssertPtrReturn(pBp, VERR_DBGF_BP_NOT_FOUND);
    22302227
    2231     int rc = VINF_SUCCESS;
     2228    int rc;
    22322229    if (!DBGF_BP_PUB_IS_ENABLED(pBp->Pub.fFlagsAndType))
    22332230        rc = dbgfR3BpArm(pUVM, hBp, pBp);
     
    22592256    AssertPtrReturn(pBp, VERR_DBGF_BP_NOT_FOUND);
    22602257
    2261     int rc = VINF_SUCCESS;
     2258    int rc;
    22622259    if (DBGF_BP_PUB_IS_ENABLED(pBp->Pub.fFlagsAndType))
    22632260        rc = dbgfR3BpDisarm(pUVM, hBp, pBp);
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