VirtualBox

Changeset 52525 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Aug 29, 2014 9:37:55 AM (10 years ago)
Author:
vboxsync
Message:

memset. arg.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/VUSBDevice.cpp

    r52522 r52525  
    12241224    /* Remove the configuration */
    12251225    pDev->pCurCfgDesc = NULL;
    1226     for (unsigned i = 0; i < VUSB_PIPE_MAX; i++)
     1226    for (unsigned i = 0; i < RT_ELEMENTS(pDev->aPipes); i++)
    12271227    {
    12281228        vusbMsgFreeExtraData(pDev->aPipes[i].pCtrl);
     1229        pDev->aPipes[i].pCtrl = NULL;
    12291230
    12301231        if (pDev->aPipes[i].hReadAhead)
     
    12331234            pDev->aPipes[i].hReadAhead = NULL;
    12341235        }
    1235     }
    1236     memset(pDev->aPipes, 0, sizeof(pDev->aPipes));
     1236
     1237        RT_ZERO(pDev->aPipes[i].in);
     1238        RT_ZERO(pDev->aPipes[i].out);
     1239        pDev->aPipes[i].async = 0;
     1240    }
    12371241    return VINF_SUCCESS;
    12381242}
     
    12631267    TMR3TimerDestroy(pDev->pResetTimer);
    12641268    pDev->pResetTimer = NULL;
    1265     for (unsigned i = 0; i < VUSB_PIPE_MAX; i++)
     1269    for (unsigned i = 0; i < RT_ELEMENTS(pDev->aPipes); i++)
    12661270        RTCritSectDelete(&pDev->aPipes[i].CritSectCtrl);
    12671271
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