VirtualBox

儲存庫 vbox 的更動 62706


忽略:
時間撮記:
2016-7-29 下午08:25:52 (8 年 以前)
作者:
vboxsync
訊息:

VBoxUsbRt.cpp: This cluelessness wrt assertion macros should be a reason for sanctions! The use of FUNCTION in the assertion message takes the prize, though. Cleaning up junk like this is such a stupid waste of time, so it'll have to wait.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp

    r62702 r62706  
    745745static NTSTATUS vboxUsbRtSetInterface(PVBOXUSBDEV_EXT pDevExt, uint32_t InterfaceNumber, int AlternateSetting)
    746746{
    747     if (!pDevExt->Rt.uConfigValue)
    748     {
    749         AssertMsgFailed((__FUNCTION__": Can't select an interface without an active configuration\n"));
    750         return STATUS_INVALID_PARAMETER;
    751     }
    752 
    753     if (InterfaceNumber >= pDevExt->Rt.uNumInterfaces)
    754     {
    755         AssertMsgFailed((__FUNCTION__": InterfaceNumber %d too high!!\n", InterfaceNumber));
    756         return STATUS_INVALID_PARAMETER;
    757     }
    758 
     747    AssertMsgReturn(pDevExt->Rt.uConfigValue, ("Can't select an interface without an active configuration\n"),
     748                    STATUS_INVALID_PARAMETER);
     749    AssertMsgReturn(InterfaceNumber < pDevExt->Rt.uNumInterfaces, ("InterfaceNumber %d too high!!\n", InterfaceNumber),
     750                    STATUS_INVALID_PARAMETER);
    759751    PUSB_CONFIGURATION_DESCRIPTOR pCfgDr = vboxUsbRtFindConfigDesc(pDevExt, pDevExt->Rt.uConfigValue);
    760     if (!pCfgDr)
    761     {
    762         AssertMsgFailed((__FUNCTION__": configuration %d not found!!\n", pDevExt->Rt.uConfigValue));
    763         return STATUS_INVALID_PARAMETER;
    764     }
    765 
     752    AssertMsgReturn(pCfgDr, ("configuration %d not found!!\n", pDevExt->Rt.uConfigValue),
     753                    STATUS_INVALID_PARAMETER);
    766754    PUSB_INTERFACE_DESCRIPTOR pIfDr = USBD_ParseConfigurationDescriptorEx(pCfgDr, pCfgDr, InterfaceNumber, AlternateSetting, -1, -1, -1);
    767     if (!pIfDr)
    768     {
    769         AssertMsgFailed((__FUNCTION__": invalid interface %d or alternate setting %d\n", InterfaceNumber, AlternateSetting));
    770         return STATUS_UNSUCCESSFUL;
    771     }
     755    AssertMsgReturn(pIfDr, ("invalid interface %d or alternate setting %d\n", InterfaceNumber, AlternateSetting),
     756                    STATUS_UNSUCCESSFUL);
    772757
    773758    USHORT uUrbSize = GET_SELECT_INTERFACE_REQUEST_SIZE(pIfDr->bNumEndpoints);
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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