- Timestamp:
- May 5, 2008 12:32:51 PM (17 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvHostBase.cpp
r8155 r8569 1163 1163 memcpy(&cdb[0], pbCmd, cbCmd); 1164 1164 IOReturn irc = (*ppScsiTaskI)->SetCommandDescriptorBlock(ppScsiTaskI, cdb, cbCmd); 1165 AssertBreak (irc == kIOReturnSuccess,);1165 AssertBreakVoid(irc == kIOReturnSuccess); 1166 1166 1167 1167 /* Setup the buffer. */ … … 1176 1176 : kSCSIDataTransfer_FromInitiatorToTarget); 1177 1177 } 1178 AssertBreak (irc == kIOReturnSuccess,);1178 AssertBreakVoid(irc == kIOReturnSuccess); 1179 1179 1180 1180 /* Set the timeout. */ 1181 1181 irc = (*ppScsiTaskI)->SetTimeoutDuration(ppScsiTaskI, cTimeoutMillies ? cTimeoutMillies : 30000 /*ms*/); 1182 AssertBreak (irc == kIOReturnSuccess,);1182 AssertBreakVoid(irc == kIOReturnSuccess); 1183 1183 1184 1184 /* Execute the command and get the response. */ … … 1188 1188 UInt64 cbReturned = 0; 1189 1189 irc = (*ppScsiTaskI)->ExecuteTaskSync(ppScsiTaskI, &SenseData, &TaskStatus, &cbReturned); 1190 AssertBreak (irc == kIOReturnSuccess,);1190 AssertBreakVoid(irc == kIOReturnSuccess); 1191 1191 if (pcbBuf) 1192 1192 *pcbBuf = cbReturned; 1193 1193 1194 1194 irc = (*ppScsiTaskI)->GetSCSIServiceResponse(ppScsiTaskI, &ServiceResponse); 1195 AssertBreak (irc == kIOReturnSuccess,);1196 AssertBreak (ServiceResponse == kSCSIServiceResponse_TASK_COMPLETE,);1195 AssertBreakVoid(irc == kIOReturnSuccess); 1196 AssertBreakVoid(ServiceResponse == kSCSIServiceResponse_TASK_COMPLETE); 1197 1197 1198 1198 if (TaskStatus == kSCSITaskStatus_GOOD) -
trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp
r8565 r8569 564 564 { 565 565 void *pvTmp = RTMemTmpAlloc(cbPreRead + cbThisWrite + cbPostRead); 566 AssertBreak (VALID_PTR(pvTmp), rc = VERR_NO_MEMORY);566 AssertBreakStmt(VALID_PTR(pvTmp), rc = VERR_NO_MEMORY); 567 567 568 568 if (!(pImage->uOpenFlags & VD_OPEN_FLAGS_HONOR_SAME)) … … 821 821 { 822 822 /* sanity check */ 823 Assert Break(VALID_PTR(pDisk),);823 AssertPtrBreakVoid(pDisk); 824 824 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 825 826 if (pDisk) 827 { 828 VDCloseAll(pDisk); 829 RTMemFree(pDisk); 830 } 825 VDCloseAll(pDisk); 826 RTMemFree(pDisk); 831 827 } while (0); 832 828 LogFlowFunc(("returns\n")); … … 965 961 /* Report the format name. */ 966 962 RTPathStripExt(pPluginDirEntry->szName); 967 AssertBreak (strlen(pPluginDirEntry->szName) > VBOX_HDDFORMAT_PLUGIN_PREFIX_LENGTH,968 rc = VERR_INVALID_NAME);963 AssertBreakStmt(strlen(pPluginDirEntry->szName) > VBOX_HDDFORMAT_PLUGIN_PREFIX_LENGTH, 964 rc = VERR_INVALID_NAME); 969 965 970 966 char *pszFormat = NULL; … … 1033 1029 { 1034 1030 /* sanity check */ 1035 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);1031 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 1036 1032 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 1037 1033 … … 1247 1243 { 1248 1244 /* sanity check */ 1249 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);1245 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 1250 1246 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 1251 1247 … … 1440 1436 { 1441 1437 /* sanity check */ 1442 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);1438 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 1443 1439 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 1444 1440 … … 1593 1589 { 1594 1590 /* sanity check */ 1595 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);1591 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 1596 1592 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 1597 1593 … … 1603 1599 break; 1604 1600 } 1605 AssertBreak (pImageFrom != pImageTo, rc = VERR_INVALID_PARAMETER);1601 AssertBreakStmt(pImageFrom != pImageTo, rc = VERR_INVALID_PARAMETER); 1606 1602 1607 1603 /* Make sure destination image is writable. */ … … 1828 1824 1829 1825 PVDIMAGE pImageFrom = vdGetImageByNumber(pDiskFrom, nImage); 1830 Assert Break(VALID_PTR(pImageFrom), rc = VERR_VDI_IMAGE_NOT_FOUND);1826 AssertPtrBreakStmt(pImageFrom, rc = VERR_VDI_IMAGE_NOT_FOUND); 1831 1827 AssertMsgBreakStmt(VALID_PTR(pDiskTo), ("pDiskTo=%#p\n", pDiskTo), 1832 1828 rc = VERR_INVALID_PARAMETER); … … 1937 1933 1938 1934 pImageTo = pDiskTo->pLast; 1939 Assert Break(VALID_PTR(pImageTo), rc = VERR_VDI_IMAGE_NOT_FOUND);1935 AssertPtrBreakStmt(pImageTo, rc = VERR_VDI_IMAGE_NOT_FOUND); 1940 1936 1941 1937 /* Allocate tmp buffer. */ … … 2048 2044 { 2049 2045 /* sanity check */ 2050 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2046 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2051 2047 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2052 2048 2053 2049 PVDIMAGE pImage = pDisk->pLast; 2054 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_NOT_OPENED);2050 AssertPtrBreakStmt(pImage, rc = VERR_VDI_NOT_OPENED); 2055 2051 unsigned uOpenFlags = pImage->Backend->pfnGetOpenFlags(pImage->pvBackendData); 2056 2052 /* Remove image from list of opened images. */ … … 2139 2135 { 2140 2136 /* sanity check */ 2141 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2137 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2142 2138 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2143 2139 … … 2189 2185 { 2190 2186 /* sanity check */ 2191 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2187 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2192 2188 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2193 2189 … … 2205 2201 2206 2202 PVDIMAGE pImage = pDisk->pLast; 2207 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_NOT_OPENED);2203 AssertPtrBreakStmt(pImage, rc = VERR_VDI_NOT_OPENED); 2208 2204 2209 2205 rc = vdReadHelper(pDisk, pImage, uOffset, pvBuf, cbRead); … … 2234 2230 { 2235 2231 /* sanity check */ 2236 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2232 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2237 2233 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2238 2234 … … 2250 2246 2251 2247 PVDIMAGE pImage = pDisk->pLast; 2252 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_NOT_OPENED);2248 AssertPtrBreakStmt(pImage, rc = VERR_VDI_NOT_OPENED); 2253 2249 2254 2250 vdSetModifiedFlag(pDisk); … … 2275 2271 { 2276 2272 /* sanity check */ 2277 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2273 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2278 2274 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2279 2275 2280 2276 PVDIMAGE pImage = pDisk->pLast; 2281 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_NOT_OPENED);2277 AssertPtrBreakStmt(pImage, rc = VERR_VDI_NOT_OPENED); 2282 2278 2283 2279 vdResetModifiedFlag(pDisk); … … 2303 2299 { 2304 2300 /* sanity check */ 2305 Assert Break(VALID_PTR(pDisk), cImages = 0);2301 AssertPtrBreakStmt(pDisk, cImages = 0); 2306 2302 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2307 2303 … … 2328 2324 { 2329 2325 /* sanity check */ 2330 Assert Break(VALID_PTR(pDisk), fReadOnly = false);2326 AssertPtrBreakStmt(pDisk, fReadOnly = false); 2331 2327 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2332 2328 2333 2329 PVDIMAGE pImage = pDisk->pLast; 2334 Assert Break(VALID_PTR(pImage), fReadOnly = true);2330 AssertPtrBreakStmt(pImage, fReadOnly = true); 2335 2331 2336 2332 unsigned uOpenFlags; … … 2359 2355 { 2360 2356 /* sanity check */ 2361 Assert Break(VALID_PTR(pDisk), cbSize = 0);2357 AssertPtrBreakStmt(pDisk, cbSize = 0); 2362 2358 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2363 2359 2364 2360 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 2365 Assert Break(VALID_PTR(pImage), cbSize = 0);2361 AssertPtrBreakStmt(pImage, cbSize = 0); 2366 2362 cbSize = pImage->Backend->pfnGetSize(pImage->pvBackendData); 2367 2363 } while (0); … … 2387 2383 { 2388 2384 /* sanity check */ 2389 Assert Break(VALID_PTR(pDisk), cbSize = 0);2385 AssertPtrBreakStmt(pDisk, cbSize = 0); 2390 2386 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2391 2387 2392 2388 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 2393 Assert Break(VALID_PTR(pImage), cbSize = 0);2389 AssertPtrBreakStmt(pImage, cbSize = 0); 2394 2390 cbSize = pImage->Backend->pfnGetFileSize(pImage->pvBackendData); 2395 2391 } while (0); … … 2419 2415 { 2420 2416 /* sanity check */ 2421 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2417 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2422 2418 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2423 2419 … … 2428 2424 2429 2425 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 2430 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);2426 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 2431 2427 2432 2428 if (pImage == pDisk->pLast) … … 2472 2468 { 2473 2469 /* sanity check */ 2474 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2470 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2475 2471 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2476 2472 … … 2486 2482 2487 2483 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 2488 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);2484 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 2489 2485 2490 2486 if (pImage == pDisk->pLast) … … 2565 2561 { 2566 2562 /* sanity check */ 2567 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2563 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2568 2564 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2569 2565 … … 2574 2570 2575 2571 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 2576 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);2572 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 2577 2573 2578 2574 if (pImage == pDisk->pLast) … … 2618 2614 { 2619 2615 /* sanity check */ 2620 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2616 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2621 2617 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2622 2618 … … 2632 2628 2633 2629 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 2634 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);2630 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 2635 2631 2636 2632 if (pImage == pDisk->pLast) … … 2710 2706 { 2711 2707 /* sanity check */ 2712 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2708 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2713 2709 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2714 2710 … … 2719 2715 2720 2716 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 2721 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);2717 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 2722 2718 2723 2719 *puVersion = pImage->Backend->pfnGetVersion(pImage->pvBackendData); … … 2747 2743 { 2748 2744 /* sanity check */ 2749 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2745 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2750 2746 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2751 2747 … … 2756 2752 2757 2753 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 2758 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);2754 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 2759 2755 2760 2756 rc = pImage->Backend->pfnGetImageType(pImage->pvBackendData, … … 2785 2781 { 2786 2782 /* sanity check */ 2787 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2783 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2788 2784 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2789 2785 … … 2794 2790 2795 2791 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 2796 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);2792 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 2797 2793 2798 2794 *puImageFlags = pImage->Backend->pfnGetImageFlags(pImage->pvBackendData); … … 2822 2818 { 2823 2819 /* sanity check */ 2824 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2820 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2825 2821 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2826 2822 … … 2831 2827 2832 2828 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 2833 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);2829 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 2834 2830 2835 2831 *puOpenFlags = pImage->Backend->pfnGetOpenFlags(pImage->pvBackendData); … … 2860 2856 { 2861 2857 /* sanity check */ 2862 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2858 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2863 2859 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2864 2860 … … 2869 2865 2870 2866 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 2871 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);2867 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 2872 2868 2873 2869 rc = pImage->Backend->pfnSetOpenFlags(pImage->pvBackendData, … … 2902 2898 { 2903 2899 /* sanity check */ 2904 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2900 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2905 2901 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2906 2902 … … 2914 2910 2915 2911 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 2916 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);2912 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 2917 2913 2918 2914 size_t cb = strlen(pImage->pszFilename); … … 2955 2951 { 2956 2952 /* sanity check */ 2957 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2953 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2958 2954 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 2959 2955 … … 2967 2963 2968 2964 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 2969 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);2965 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 2970 2966 2971 2967 rc = pImage->Backend->pfnGetComment(pImage->pvBackendData, pszComment, … … 2996 2992 { 2997 2993 /* sanity check */ 2998 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);2994 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 2999 2995 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 3000 2996 … … 3005 3001 3006 3002 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 3007 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);3003 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 3008 3004 3009 3005 rc = pImage->Backend->pfnSetComment(pImage->pvBackendData, pszComment); … … 3032 3028 { 3033 3029 /* sanity check */ 3034 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);3030 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 3035 3031 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 3036 3032 … … 3041 3037 3042 3038 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 3043 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);3039 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 3044 3040 3045 3041 rc = pImage->Backend->pfnGetUuid(pImage->pvBackendData, pUuid); … … 3068 3064 { 3069 3065 /* sanity check */ 3070 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);3066 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 3071 3067 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 3072 3068 … … 3076 3072 3077 3073 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 3078 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);3074 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 3079 3075 3080 3076 RTUUID Uuid; … … 3108 3104 { 3109 3105 /* sanity check */ 3110 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);3106 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 3111 3107 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 3112 3108 … … 3117 3113 3118 3114 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 3119 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);3115 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 3120 3116 3121 3117 rc = pImage->Backend->pfnGetModificationUuid(pImage->pvBackendData, … … 3145 3141 { 3146 3142 /* sanity check */ 3147 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);3143 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 3148 3144 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 3149 3145 … … 3154 3150 3155 3151 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 3156 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);3152 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 3157 3153 3158 3154 RTUUID Uuid; … … 3188 3184 { 3189 3185 /* sanity check */ 3190 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);3186 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 3191 3187 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 3192 3188 … … 3197 3193 3198 3194 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 3199 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);3195 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 3200 3196 3201 3197 rc = pImage->Backend->pfnGetParentUuid(pImage->pvBackendData, pUuid); … … 3224 3220 { 3225 3221 /* sanity check */ 3226 Assert Break(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);3222 AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER); 3227 3223 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 3228 3224 … … 3233 3229 3234 3230 PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage); 3235 Assert Break(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);3231 AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND); 3236 3232 3237 3233 RTUUID Uuid; … … 3259 3255 { 3260 3256 /* sanity check */ 3261 Assert Break(VALID_PTR(pDisk),);3257 AssertPtrBreakVoid(pDisk); 3262 3258 AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature)); 3263 3259 -
trunk/src/VBox/Main/ConsoleImpl.cpp
r8548 r8569 2878 2878 2879 2879 pIMount = (PPDMIMOUNT) pBase->pfnQueryInterface (pBase, PDMINTERFACE_MOUNT); 2880 AssertBreak (pIMount, rc = VERR_INVALID_POINTER);2880 AssertBreakStmt (pIMount, rc = VERR_INVALID_POINTER); 2881 2881 2882 2882 /* -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r8457 r8569 723 723 { 724 724 ComPtr<IVirtualDiskImage> vdiDisk = hardDisk; 725 AssertBreak (!vdiDisk.isNull(), hrc = E_FAIL);725 AssertBreakStmt (!vdiDisk.isNull(), hrc = E_FAIL); 726 726 727 727 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); … … 743 743 744 744 vdiDisk = curHardDisk; 745 AssertBreak (!vdiDisk.isNull(), hrc = E_FAIL);745 AssertBreakStmt (!vdiDisk.isNull(), hrc = E_FAIL); 746 746 747 747 PCFGMNODE pCur; … … 761 761 { 762 762 ComPtr<IISCSIHardDisk> iSCSIDisk = hardDisk; 763 AssertBreak (!iSCSIDisk.isNull(), hrc = E_FAIL);763 AssertBreakStmt (!iSCSIDisk.isNull(), hrc = E_FAIL); 764 764 765 765 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); … … 827 827 { 828 828 ComPtr<IVMDKImage> vmdkDisk = hardDisk; 829 AssertBreak (!vmdkDisk.isNull(), hrc = E_FAIL);829 AssertBreakStmt (!vmdkDisk.isNull(), hrc = E_FAIL); 830 830 831 831 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); … … 845 845 { 846 846 ComPtr<ICustomHardDisk> customHardDisk = hardDisk; 847 AssertBreak (!customHardDisk.isNull(), hrc = E_FAIL);847 AssertBreakStmt (!customHardDisk.isNull(), hrc = E_FAIL); 848 848 849 849 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); … … 862 862 { 863 863 ComPtr<IVHDImage> vhdDisk = hardDisk; 864 AssertBreak (!vhdDisk.isNull(), hrc = E_FAIL);864 AssertBreakStmt (!vhdDisk.isNull(), hrc = E_FAIL); 865 865 866 866 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r8170 r8569 2393 2393 do 2394 2394 { 2395 AssertBreak (d.get(), rc = E_POINTER);2395 AssertBreakStmt (d.get(), rc = E_POINTER); 2396 2396 AssertReturn (!d->progress.isNull(), E_POINTER); 2397 2397 -
trunk/src/VBox/Main/darwin/iokit.cpp
r8538 r8569 821 821 do /* loop for breaking out of on failure. */ 822 822 { 823 AssertBreak (pCur,);823 AssertBreakVoid(pCur); 824 824 825 825 /* … … 829 829 pCur->enmState = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE; /* just a default, we'll try harder in a bit. */ 830 830 831 AssertBreak (darwinDictGetU8(PropsRef, CFSTR(kUSBDeviceClass), &pCur->bDeviceClass),);831 AssertBreakVoid(darwinDictGetU8(PropsRef, CFSTR(kUSBDeviceClass), &pCur->bDeviceClass)); 832 832 /* skip hubs */ 833 833 if (pCur->bDeviceClass == 0x09 /* hub, find a define! */) 834 834 break; 835 AssertBreak (darwinDictGetU8(PropsRef, CFSTR(kUSBDeviceSubClass), &pCur->bDeviceSubClass),);836 AssertBreak (darwinDictGetU8(PropsRef, CFSTR(kUSBDeviceProtocol), &pCur->bDeviceProtocol),);837 AssertBreak (darwinDictGetU16(PropsRef, CFSTR(kUSBVendorID), &pCur->idVendor),);838 AssertBreak (darwinDictGetU16(PropsRef, CFSTR(kUSBProductID), &pCur->idProduct),);839 AssertBreak (darwinDictGetU16(PropsRef, CFSTR(kUSBDeviceReleaseNumber), &pCur->bcdDevice),);835 AssertBreakVoid(darwinDictGetU8(PropsRef, CFSTR(kUSBDeviceSubClass), &pCur->bDeviceSubClass)); 836 AssertBreakVoid(darwinDictGetU8(PropsRef, CFSTR(kUSBDeviceProtocol), &pCur->bDeviceProtocol)); 837 AssertBreakVoid(darwinDictGetU16(PropsRef, CFSTR(kUSBVendorID), &pCur->idVendor)); 838 AssertBreakVoid(darwinDictGetU16(PropsRef, CFSTR(kUSBProductID), &pCur->idProduct)); 839 AssertBreakVoid(darwinDictGetU16(PropsRef, CFSTR(kUSBDeviceReleaseNumber), &pCur->bcdDevice)); 840 840 uint32_t u32LocationId; 841 AssertBreak (darwinDictGetU32(PropsRef, CFSTR(kUSBDevicePropertyLocationID), &u32LocationId),);841 AssertBreakVoid(darwinDictGetU32(PropsRef, CFSTR(kUSBDevicePropertyLocationID), &u32LocationId)); 842 842 uint64_t u64SessionId; 843 AssertBreak (darwinDictGetU64(PropsRef, CFSTR("sessionID"), &u64SessionId),);843 AssertBreakVoid(darwinDictGetU64(PropsRef, CFSTR("sessionID"), &u64SessionId)); 844 844 char szAddress[64]; 845 845 RTStrPrintf(szAddress, sizeof(szAddress), "p=0x%04RX16;v=0x%04RX16;s=0x%016RX64;l=0x%08RX32", 846 846 pCur->idProduct, pCur->idVendor, u64SessionId, u32LocationId); 847 847 pCur->pszAddress = RTStrDup(szAddress); 848 AssertBreak (pCur->pszAddress,);848 AssertBreakVoid(pCur->pszAddress); 849 849 pCur->bBus = u32LocationId >> 24; 850 AssertBreak (darwinDictGetU8(PropsRef, CFSTR("PortNum"), &pCur->bPort),);850 AssertBreakVoid(darwinDictGetU8(PropsRef, CFSTR("PortNum"), &pCur->bPort)); 851 851 uint8_t bSpeed; 852 AssertBreak (darwinDictGetU8(PropsRef, CFSTR(kUSBDevicePropertySpeed), &bSpeed),);852 AssertBreakVoid(darwinDictGetU8(PropsRef, CFSTR(kUSBDevicePropertySpeed), &bSpeed)); 853 853 Assert(bSpeed <= 2); 854 854 pCur->enmSpeed = bSpeed == 2 ? USBDEVICESPEED_HIGH … … 1027 1027 SInt32 i32 = (int16_t)u64Value; 1028 1028 CFNumberRef Num = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &i32); 1029 AssertBreak (Num,);1029 AssertBreakVoid(Num); 1030 1030 CFDictionarySetValue(RefMatchingDict, chValue == 'p' ? CFSTR(kUSBProductID) : CFSTR(kUSBVendorID), Num); 1031 1031 CFRelease(Num); -
trunk/src/VBox/Main/linux/server_module.cpp
r8155 r8569 78 78 }; 79 79 80 /** 80 /** 81 81 * Full path to the VBoxSVC executable. 82 82 */ … … 93 93 NS_IMPL_CI_INTERFACE_GETTER1 (VirtualBox, IVirtualBox) 94 94 95 /** 95 /** 96 96 * VirtualBox component constructor. 97 97 * … … 135 135 136 136 LogFlowFunc (("component directory = \"%s\"\n", path.get())); 137 AssertBreak (path.Length() + strlen (VBoxSVC_exe) < RTPATH_MAX,138 rc = NS_ERROR_FAILURE);137 AssertBreakStmt (path.Length() + strlen (VBoxSVC_exe) < RTPATH_MAX, 138 rc = NS_ERROR_FAILURE); 139 139 140 140 strcpy (VBoxSVCPath, path.get()); … … 255 255 #if 0 256 256 /// @todo not really necessary for the moment 257 /** 258 * 259 * @param aCompMgr 260 * @param aPath 261 * @param aLoaderStr 262 * @param aType 263 * @param aInfo 264 * 265 * @return 257 /** 258 * 259 * @param aCompMgr 260 * @param aPath 261 * @param aLoaderStr 262 * @param aType 263 * @param aInfo 264 * 265 * @return 266 266 */ 267 267 static NS_IMETHODIMP … … 286 286 #endif 287 287 288 /** 288 /** 289 289 * Component definition table. 290 290 * Lists all components defined in this module. … … 299 299 NULL, // deregistration function 300 300 NULL, // destructor function 301 /// @todo 301 /// @todo 302 302 NS_CI_INTERFACE_GETTER_NAME(VirtualBox), // interfaces function 303 303 NULL, // language helper 304 /// @todo 304 /// @todo 305 305 &NS_CLASSINFO_NAME(VirtualBox) // global class info & flags 306 306 } -
trunk/src/VBox/Runtime/common/time/time.cpp
r8245 r8569 468 468 { 469 469 /* If you change one, zero the other to make clear what you mean. */ 470 AssertBreak (pTime->u8Month <= 12,);471 AssertBreak (pTime->u8MonthDay <= (fLeapYear472 ? g_acDaysInMonthsLeap[pTime->u8Month - 1]473 : g_acDaysInMonths[pTime->u8Month - 1]),);470 AssertBreakVoid(pTime->u8Month <= 12); 471 AssertBreakVoid(pTime->u8MonthDay <= (fLeapYear 472 ? g_acDaysInMonthsLeap[pTime->u8Month - 1] 473 : g_acDaysInMonths[pTime->u8Month - 1])); 474 474 uint16_t u16YearDay = pTime->u8MonthDay - 1 475 475 + (fLeapYear 476 476 ? g_aiDayOfYearLeap[pTime->u8Month - 1] 477 477 : g_aiDayOfYear[pTime->u8Month - 1]); 478 AssertBreak (u16YearDay == pTime->u16YearDay,);478 AssertBreakVoid(u16YearDay == pTime->u16YearDay); 479 479 fRecalc = false; 480 480 } while (0); -
trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
r8245 r8569 1059 1059 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) || defined(HAVE_26_STYLE_REMAP_PAGE_RANGE) 1060 1060 struct vm_area_struct *vma = find_vma(pTask->mm, ulAddrCur); /* this is probably the same for all the pages... */ 1061 AssertBreak (vma, rc = VERR_INTERNAL_ERROR);1061 AssertBreakStmt(vma, rc = VERR_INTERNAL_ERROR); 1062 1062 #endif 1063 1063 … … 1091 1091 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) || defined(HAVE_26_STYLE_REMAP_PAGE_RANGE) 1092 1092 struct vm_area_struct *vma = find_vma(pTask->mm, ulAddrCur); /* this is probably the same for all the pages... */ 1093 AssertBreak (vma, rc = VERR_INTERNAL_ERROR);1093 AssertBreakStmt(vma, rc = VERR_INTERNAL_ERROR); 1094 1094 #endif 1095 1095 -
trunk/src/VBox/VMM/VMMAll/TMAllVirtual.cpp
r8155 r8569 256 256 if (ASMAtomicCmpXchgU64(&pVM->tm.s.u64VirtualRawPrev, u64NanoTS, u64PrevNanoTS)) 257 257 break; 258 AssertBreak (--cTries <= 0,);258 AssertBreakVoid(--cTries <= 0); 259 259 if (cTries < 25 && !VM_IS_EMT(pVM)) /* give up early */ 260 260 break;
Note:
See TracChangeset
for help on using the changeset viewer.