VirtualBox

Ignore:
Timestamp:
Jan 6, 2025 10:04:59 AM (5 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
166461
Message:

VMM/GIMHV: bugref:3409 Fixed two redundant 'if' conditions. Eliminated a redundant assignment (+ followup assert originally intended for debug builds to catch uninitialized 'rc' usage in large switch case).

File:
1 edited

Legend:

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

    r107113 r107410  
    16061606    AssertCompile(sizeof(size_t) >= sizeof(uint32_t));
    16071607    AssertReturn(cbBuf >= cbRead, VERR_INVALID_PARAMETER);
     1608    Assert(cbRead > 0);
    16081609
    16091610    int rc;
     
    16231624         */
    16241625        PGIMHV pHv = &pVM->gim.s.u.Hv;
    1625         rc = VERR_GIM_IPE_1;
    16261626        switch (pHv->enmDbgReply)
    16271627        {
     
    17701770            }
    17711771        }
    1772         Assert(rc != VERR_GIM_IPE_1);
    17731772
    17741773#ifdef DEBUG_ramshankar
     
    20502049        pOut->cbPending = 0;
    20512050    }
    2052     else if (cbWrite > 0)
     2051    else
    20532052    {
    20542053        uint32_t cbWritten = 0;
     
    21292128    else if (!cbRead)
    21302129        rcHv = GIM_HV_STATUS_SUCCESS;
    2131     else if (cbRead > 0)
     2130    else
    21322131    {
    21332132        int rc2 = gimR3HvDebugRead(pVM, pvData, GIM_HV_PAGE_SIZE, cbRead, pcbReallyRead, cMsTimeout,
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