VirtualBox

Changeset 8569 in vbox for trunk/src


Ignore:
Timestamp:
May 5, 2008 12:32:51 PM (17 years ago)
Author:
vboxsync
Message:

AssertBreak -> AssertBreakStmt.

Location:
trunk/src/VBox
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DrvHostBase.cpp

    r8155 r8569  
    11631163        memcpy(&cdb[0], pbCmd, cbCmd);
    11641164        IOReturn irc = (*ppScsiTaskI)->SetCommandDescriptorBlock(ppScsiTaskI, cdb, cbCmd);
    1165         AssertBreak(irc == kIOReturnSuccess,);
     1165        AssertBreakVoid(irc == kIOReturnSuccess);
    11661166
    11671167        /* Setup the buffer. */
     
    11761176                                                          : kSCSIDataTransfer_FromInitiatorToTarget);
    11771177        }
    1178         AssertBreak(irc == kIOReturnSuccess,);
     1178        AssertBreakVoid(irc == kIOReturnSuccess);
    11791179
    11801180        /* Set the timeout. */
    11811181        irc = (*ppScsiTaskI)->SetTimeoutDuration(ppScsiTaskI, cTimeoutMillies ? cTimeoutMillies : 30000 /*ms*/);
    1182         AssertBreak(irc == kIOReturnSuccess,);
     1182        AssertBreakVoid(irc == kIOReturnSuccess);
    11831183
    11841184        /* Execute the command and get the response. */
     
    11881188        UInt64 cbReturned = 0;
    11891189        irc = (*ppScsiTaskI)->ExecuteTaskSync(ppScsiTaskI, &SenseData, &TaskStatus, &cbReturned);
    1190         AssertBreak(irc == kIOReturnSuccess,);
     1190        AssertBreakVoid(irc == kIOReturnSuccess);
    11911191        if (pcbBuf)
    11921192            *pcbBuf = cbReturned;
    11931193
    11941194        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);
    11971197
    11981198        if (TaskStatus == kSCSITaskStatus_GOOD)
  • trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp

    r8565 r8569  
    564564        {
    565565            void *pvTmp = RTMemTmpAlloc(cbPreRead + cbThisWrite + cbPostRead);
    566             AssertBreak(VALID_PTR(pvTmp), rc = VERR_NO_MEMORY);
     566            AssertBreakStmt(VALID_PTR(pvTmp), rc = VERR_NO_MEMORY);
    567567
    568568            if (!(pImage->uOpenFlags & VD_OPEN_FLAGS_HONOR_SAME))
     
    821821    {
    822822        /* sanity check */
    823         AssertBreak(VALID_PTR(pDisk), );
     823        AssertPtrBreakVoid(pDisk);
    824824        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);
    831827    } while (0);
    832828    LogFlowFunc(("returns\n"));
     
    965961                            /* Report the format name. */
    966962                            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);
    969965
    970966                            char *pszFormat = NULL;
     
    10331029    {
    10341030        /* sanity check */
    1035         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     1031        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    10361032        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    10371033
     
    12471243    {
    12481244        /* sanity check */
    1249         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     1245        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    12501246        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    12511247
     
    14401436    {
    14411437        /* sanity check */
    1442         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     1438        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    14431439        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    14441440
     
    15931589    {
    15941590        /* sanity check */
    1595         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     1591        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    15961592        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    15971593
     
    16031599            break;
    16041600        }
    1605         AssertBreak(pImageFrom != pImageTo, rc = VERR_INVALID_PARAMETER);
     1601        AssertBreakStmt(pImageFrom != pImageTo, rc = VERR_INVALID_PARAMETER);
    16061602
    16071603        /* Make sure destination image is writable. */
     
    18281824
    18291825        PVDIMAGE pImageFrom = vdGetImageByNumber(pDiskFrom, nImage);
    1830         AssertBreak(VALID_PTR(pImageFrom), rc = VERR_VDI_IMAGE_NOT_FOUND);
     1826        AssertPtrBreakStmt(pImageFrom, rc = VERR_VDI_IMAGE_NOT_FOUND);
    18311827        AssertMsgBreakStmt(VALID_PTR(pDiskTo), ("pDiskTo=%#p\n", pDiskTo),
    18321828                           rc = VERR_INVALID_PARAMETER);
     
    19371933
    19381934        pImageTo = pDiskTo->pLast;
    1939         AssertBreak(VALID_PTR(pImageTo), rc = VERR_VDI_IMAGE_NOT_FOUND);
     1935        AssertPtrBreakStmt(pImageTo, rc = VERR_VDI_IMAGE_NOT_FOUND);
    19401936
    19411937        /* Allocate tmp buffer. */
     
    20482044    {
    20492045        /* sanity check */
    2050         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2046        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    20512047        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    20522048
    20532049        PVDIMAGE pImage = pDisk->pLast;
    2054         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_NOT_OPENED);
     2050        AssertPtrBreakStmt(pImage, rc = VERR_VDI_NOT_OPENED);
    20552051        unsigned uOpenFlags = pImage->Backend->pfnGetOpenFlags(pImage->pvBackendData);
    20562052        /* Remove image from list of opened images. */
     
    21392135    {
    21402136        /* sanity check */
    2141         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2137        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    21422138        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    21432139
     
    21892185    {
    21902186        /* sanity check */
    2191         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2187        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    21922188        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    21932189
     
    22052201
    22062202        PVDIMAGE pImage = pDisk->pLast;
    2207         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_NOT_OPENED);
     2203        AssertPtrBreakStmt(pImage, rc = VERR_VDI_NOT_OPENED);
    22082204
    22092205        rc = vdReadHelper(pDisk, pImage, uOffset, pvBuf, cbRead);
     
    22342230    {
    22352231        /* sanity check */
    2236         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2232        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    22372233        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    22382234
     
    22502246
    22512247        PVDIMAGE pImage = pDisk->pLast;
    2252         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_NOT_OPENED);
     2248        AssertPtrBreakStmt(pImage, rc = VERR_VDI_NOT_OPENED);
    22532249
    22542250        vdSetModifiedFlag(pDisk);
     
    22752271    {
    22762272        /* sanity check */
    2277         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2273        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    22782274        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    22792275
    22802276        PVDIMAGE pImage = pDisk->pLast;
    2281         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_NOT_OPENED);
     2277        AssertPtrBreakStmt(pImage, rc = VERR_VDI_NOT_OPENED);
    22822278
    22832279        vdResetModifiedFlag(pDisk);
     
    23032299    {
    23042300        /* sanity check */
    2305         AssertBreak(VALID_PTR(pDisk), cImages = 0);
     2301        AssertPtrBreakStmt(pDisk, cImages = 0);
    23062302        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    23072303
     
    23282324    {
    23292325        /* sanity check */
    2330         AssertBreak(VALID_PTR(pDisk), fReadOnly = false);
     2326        AssertPtrBreakStmt(pDisk, fReadOnly = false);
    23312327        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    23322328
    23332329        PVDIMAGE pImage = pDisk->pLast;
    2334         AssertBreak(VALID_PTR(pImage), fReadOnly = true);
     2330        AssertPtrBreakStmt(pImage, fReadOnly = true);
    23352331
    23362332        unsigned uOpenFlags;
     
    23592355    {
    23602356        /* sanity check */
    2361         AssertBreak(VALID_PTR(pDisk), cbSize = 0);
     2357        AssertPtrBreakStmt(pDisk, cbSize = 0);
    23622358        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    23632359
    23642360        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    2365         AssertBreak(VALID_PTR(pImage), cbSize = 0);
     2361        AssertPtrBreakStmt(pImage, cbSize = 0);
    23662362        cbSize = pImage->Backend->pfnGetSize(pImage->pvBackendData);
    23672363    } while (0);
     
    23872383    {
    23882384        /* sanity check */
    2389         AssertBreak(VALID_PTR(pDisk), cbSize = 0);
     2385        AssertPtrBreakStmt(pDisk, cbSize = 0);
    23902386        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    23912387
    23922388        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    2393         AssertBreak(VALID_PTR(pImage), cbSize = 0);
     2389        AssertPtrBreakStmt(pImage, cbSize = 0);
    23942390        cbSize = pImage->Backend->pfnGetFileSize(pImage->pvBackendData);
    23952391    } while (0);
     
    24192415    {
    24202416        /* sanity check */
    2421         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2417        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    24222418        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    24232419
     
    24282424
    24292425        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    2430         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     2426        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    24312427
    24322428        if (pImage == pDisk->pLast)
     
    24722468    {
    24732469        /* sanity check */
    2474         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2470        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    24752471        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    24762472
     
    24862482
    24872483        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    2488         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     2484        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    24892485
    24902486        if (pImage == pDisk->pLast)
     
    25652561    {
    25662562        /* sanity check */
    2567         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2563        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    25682564        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    25692565
     
    25742570
    25752571        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    2576         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     2572        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    25772573
    25782574        if (pImage == pDisk->pLast)
     
    26182614    {
    26192615        /* sanity check */
    2620         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2616        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    26212617        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    26222618
     
    26322628
    26332629        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    2634         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     2630        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    26352631
    26362632        if (pImage == pDisk->pLast)
     
    27102706    {
    27112707        /* sanity check */
    2712         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2708        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    27132709        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    27142710
     
    27192715
    27202716        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    2721         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     2717        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    27222718
    27232719        *puVersion = pImage->Backend->pfnGetVersion(pImage->pvBackendData);
     
    27472743    {
    27482744        /* sanity check */
    2749         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2745        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    27502746        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    27512747
     
    27562752
    27572753        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    2758         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     2754        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    27592755
    27602756        rc = pImage->Backend->pfnGetImageType(pImage->pvBackendData,
     
    27852781    {
    27862782        /* sanity check */
    2787         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2783        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    27882784        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    27892785
     
    27942790
    27952791        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    2796         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     2792        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    27972793
    27982794        *puImageFlags = pImage->Backend->pfnGetImageFlags(pImage->pvBackendData);
     
    28222818    {
    28232819        /* sanity check */
    2824         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2820        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    28252821        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    28262822
     
    28312827
    28322828        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    2833         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     2829        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    28342830
    28352831        *puOpenFlags = pImage->Backend->pfnGetOpenFlags(pImage->pvBackendData);
     
    28602856    {
    28612857        /* sanity check */
    2862         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2858        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    28632859        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    28642860
     
    28692865
    28702866        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    2871         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     2867        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    28722868
    28732869        rc = pImage->Backend->pfnSetOpenFlags(pImage->pvBackendData,
     
    29022898    {
    29032899        /* sanity check */
    2904         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2900        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    29052901        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    29062902
     
    29142910
    29152911        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    2916         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     2912        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    29172913
    29182914        size_t cb = strlen(pImage->pszFilename);
     
    29552951    {
    29562952        /* sanity check */
    2957         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2953        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    29582954        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    29592955
     
    29672963
    29682964        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    2969         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     2965        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    29702966
    29712967        rc = pImage->Backend->pfnGetComment(pImage->pvBackendData, pszComment,
     
    29962992    {
    29972993        /* sanity check */
    2998         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     2994        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    29992995        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    30002996
     
    30053001
    30063002        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    3007         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     3003        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    30083004
    30093005        rc = pImage->Backend->pfnSetComment(pImage->pvBackendData, pszComment);
     
    30323028    {
    30333029        /* sanity check */
    3034         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     3030        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    30353031        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    30363032
     
    30413037
    30423038        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    3043         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     3039        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    30443040
    30453041        rc = pImage->Backend->pfnGetUuid(pImage->pvBackendData, pUuid);
     
    30683064    {
    30693065        /* sanity check */
    3070         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     3066        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    30713067        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    30723068
     
    30763072
    30773073        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    3078         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     3074        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    30793075
    30803076        RTUUID Uuid;
     
    31083104    {
    31093105        /* sanity check */
    3110         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     3106        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    31113107        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    31123108
     
    31173113
    31183114        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    3119         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     3115        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    31203116
    31213117        rc = pImage->Backend->pfnGetModificationUuid(pImage->pvBackendData,
     
    31453141    {
    31463142        /* sanity check */
    3147         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     3143        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    31483144        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    31493145
     
    31543150
    31553151        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    3156         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     3152        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    31573153
    31583154        RTUUID Uuid;
     
    31883184    {
    31893185        /* sanity check */
    3190         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     3186        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    31913187        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    31923188
     
    31973193
    31983194        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    3199         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     3195        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    32003196
    32013197        rc = pImage->Backend->pfnGetParentUuid(pImage->pvBackendData, pUuid);
     
    32243220    {
    32253221        /* sanity check */
    3226         AssertBreak(VALID_PTR(pDisk), rc = VERR_INVALID_PARAMETER);
     3222        AssertPtrBreakStmt(pDisk, rc = VERR_INVALID_PARAMETER);
    32273223        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    32283224
     
    32333229
    32343230        PVDIMAGE pImage = vdGetImageByNumber(pDisk, nImage);
    3235         AssertBreak(VALID_PTR(pImage), rc = VERR_VDI_IMAGE_NOT_FOUND);
     3231        AssertPtrBreakStmt(pImage, rc = VERR_VDI_IMAGE_NOT_FOUND);
    32363232
    32373233        RTUUID Uuid;
     
    32593255    {
    32603256        /* sanity check */
    3261         AssertBreak(VALID_PTR(pDisk), );
     3257        AssertPtrBreakVoid(pDisk);
    32623258        AssertMsg(pDisk->u32Signature == VBOXHDDDISK_SIGNATURE, ("u32Signature=%08x\n", pDisk->u32Signature));
    32633259
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r8548 r8569  
    28782878
    28792879                pIMount = (PPDMIMOUNT) pBase->pfnQueryInterface (pBase, PDMINTERFACE_MOUNT);
    2880                 AssertBreak (pIMount, rc = VERR_INVALID_POINTER);
     2880                AssertBreakStmt (pIMount, rc = VERR_INVALID_POINTER);
    28812881
    28822882                /*
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r8457 r8569  
    723723            {
    724724                ComPtr<IVirtualDiskImage> vdiDisk = hardDisk;
    725                 AssertBreak (!vdiDisk.isNull(), hrc = E_FAIL);
     725                AssertBreakStmt (!vdiDisk.isNull(), hrc = E_FAIL);
    726726
    727727                rc = CFGMR3InsertNode(pLunL0,   "AttachedDriver", &pLunL1);                 RC_CHECK();
     
    743743
    744744                    vdiDisk = curHardDisk;
    745                     AssertBreak (!vdiDisk.isNull(), hrc = E_FAIL);
     745                    AssertBreakStmt (!vdiDisk.isNull(), hrc = E_FAIL);
    746746
    747747                    PCFGMNODE pCur;
     
    761761            {
    762762                ComPtr<IISCSIHardDisk> iSCSIDisk = hardDisk;
    763                 AssertBreak (!iSCSIDisk.isNull(), hrc = E_FAIL);
     763                AssertBreakStmt (!iSCSIDisk.isNull(), hrc = E_FAIL);
    764764
    765765                rc = CFGMR3InsertNode(pLunL0,   "AttachedDriver", &pLunL1);                 RC_CHECK();
     
    827827            {
    828828                ComPtr<IVMDKImage> vmdkDisk = hardDisk;
    829                 AssertBreak (!vmdkDisk.isNull(), hrc = E_FAIL);
     829                AssertBreakStmt (!vmdkDisk.isNull(), hrc = E_FAIL);
    830830
    831831                rc = CFGMR3InsertNode(pLunL0,   "AttachedDriver", &pLunL1);                 RC_CHECK();
     
    845845            {
    846846                ComPtr<ICustomHardDisk> customHardDisk = hardDisk;
    847                 AssertBreak (!customHardDisk.isNull(), hrc = E_FAIL);
     847                AssertBreakStmt (!customHardDisk.isNull(), hrc = E_FAIL);
    848848
    849849                rc = CFGMR3InsertNode(pLunL0,   "AttachedDriver", &pLunL1);                 RC_CHECK();
     
    862862            {
    863863                ComPtr<IVHDImage> vhdDisk = hardDisk;
    864                 AssertBreak (!vhdDisk.isNull(), hrc = E_FAIL);
     864                AssertBreakStmt (!vhdDisk.isNull(), hrc = E_FAIL);
    865865
    866866                rc = CFGMR3InsertNode(pLunL0,   "AttachedDriver", &pLunL1);                 RC_CHECK();
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r8170 r8569  
    23932393    do
    23942394    {
    2395         AssertBreak (d.get(), rc = E_POINTER);
     2395        AssertBreakStmt (d.get(), rc = E_POINTER);
    23962396        AssertReturn (!d->progress.isNull(), E_POINTER);
    23972397
  • trunk/src/VBox/Main/darwin/iokit.cpp

    r8538 r8569  
    821821            do /* loop for breaking out of on failure. */
    822822            {
    823                 AssertBreak(pCur,);
     823                AssertBreakVoid(pCur);
    824824
    825825                /*
     
    829829                pCur->enmState = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE;    /* just a default, we'll try harder in a bit. */
    830830
    831                 AssertBreak(darwinDictGetU8(PropsRef,  CFSTR(kUSBDeviceClass),           &pCur->bDeviceClass),);
     831                AssertBreakVoid(darwinDictGetU8(PropsRef,  CFSTR(kUSBDeviceClass),           &pCur->bDeviceClass));
    832832                /* skip hubs */
    833833                if (pCur->bDeviceClass == 0x09 /* hub, find a define! */)
    834834                    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));
    840840                uint32_t u32LocationId;
    841                 AssertBreak(darwinDictGetU32(PropsRef, CFSTR(kUSBDevicePropertyLocationID), &u32LocationId),);
     841                AssertBreakVoid(darwinDictGetU32(PropsRef, CFSTR(kUSBDevicePropertyLocationID), &u32LocationId));
    842842                uint64_t u64SessionId;
    843                 AssertBreak(darwinDictGetU64(PropsRef, CFSTR("sessionID"), &u64SessionId),);
     843                AssertBreakVoid(darwinDictGetU64(PropsRef, CFSTR("sessionID"), &u64SessionId));
    844844                char szAddress[64];
    845845                RTStrPrintf(szAddress, sizeof(szAddress), "p=0x%04RX16;v=0x%04RX16;s=0x%016RX64;l=0x%08RX32",
    846846                            pCur->idProduct, pCur->idVendor, u64SessionId, u32LocationId);
    847847                pCur->pszAddress = RTStrDup(szAddress);
    848                 AssertBreak(pCur->pszAddress,);
     848                AssertBreakVoid(pCur->pszAddress);
    849849                pCur->bBus = u32LocationId >> 24;
    850                 AssertBreak(darwinDictGetU8(PropsRef,  CFSTR("PortNum"),                &pCur->bPort),);
     850                AssertBreakVoid(darwinDictGetU8(PropsRef,  CFSTR("PortNum"),                &pCur->bPort));
    851851                uint8_t bSpeed;
    852                 AssertBreak(darwinDictGetU8(PropsRef,  CFSTR(kUSBDevicePropertySpeed),  &bSpeed),);
     852                AssertBreakVoid(darwinDictGetU8(PropsRef,  CFSTR(kUSBDevicePropertySpeed),  &bSpeed));
    853853                Assert(bSpeed <= 2);
    854854                pCur->enmSpeed = bSpeed == 2 ? USBDEVICESPEED_HIGH
     
    10271027                SInt32 i32 = (int16_t)u64Value;
    10281028                CFNumberRef Num = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &i32);
    1029                 AssertBreak(Num,);
     1029                AssertBreakVoid(Num);
    10301030                CFDictionarySetValue(RefMatchingDict, chValue == 'p' ? CFSTR(kUSBProductID) : CFSTR(kUSBVendorID), Num);
    10311031                CFRelease(Num);
  • trunk/src/VBox/Main/linux/server_module.cpp

    r8155 r8569  
    7878};
    7979
    80 /** 
     80/**
    8181 *  Full path to the VBoxSVC executable.
    8282 */
     
    9393NS_IMPL_CI_INTERFACE_GETTER1 (VirtualBox, IVirtualBox)
    9494
    95 /** 
     95/**
    9696 *  VirtualBox component constructor.
    9797 *
     
    135135
    136136                    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);
    139139
    140140                    strcpy (VBoxSVCPath, path.get());
     
    255255#if 0
    256256/// @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
    266266 */
    267267static NS_IMETHODIMP
     
    286286#endif
    287287
    288 /** 
     288/**
    289289 *  Component definition table.
    290290 *  Lists all components defined in this module.
     
    299299        NULL, // deregistration function
    300300        NULL, // destructor function
    301         /// @todo 
     301        /// @todo
    302302        NS_CI_INTERFACE_GETTER_NAME(VirtualBox), // interfaces function
    303303        NULL, // language helper
    304         /// @todo 
     304        /// @todo
    305305        &NS_CLASSINFO_NAME(VirtualBox) // global class info & flags
    306306    }
  • trunk/src/VBox/Runtime/common/time/time.cpp

    r8245 r8569  
    468468            {
    469469                /* If you change one, zero the other to make clear what you mean. */
    470                 AssertBreak(pTime->u8Month <= 12,);
    471                 AssertBreak(pTime->u8MonthDay <= (fLeapYear
    472                                                   ? 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]));
    474474                uint16_t u16YearDay = pTime->u8MonthDay - 1
    475475                                    + (fLeapYear
    476476                                       ? g_aiDayOfYearLeap[pTime->u8Month - 1]
    477477                                       : g_aiDayOfYear[pTime->u8Month - 1]);
    478                 AssertBreak(u16YearDay == pTime->u16YearDay, );
     478                AssertBreakVoid(u16YearDay == pTime->u16YearDay);
    479479                fRecalc = false;
    480480            } while (0);
  • trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c

    r8245 r8569  
    10591059#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) || defined(HAVE_26_STYLE_REMAP_PAGE_RANGE)
    10601060                    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);
    10621062#endif
    10631063
     
    10911091#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) || defined(HAVE_26_STYLE_REMAP_PAGE_RANGE)
    10921092                        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);
    10941094#endif
    10951095
  • trunk/src/VBox/VMM/VMMAll/TMAllVirtual.cpp

    r8155 r8569  
    256256        if (ASMAtomicCmpXchgU64(&pVM->tm.s.u64VirtualRawPrev, u64NanoTS, u64PrevNanoTS))
    257257            break;
    258         AssertBreak(--cTries <= 0, );
     258        AssertBreakVoid(--cTries <= 0);
    259259        if (cTries < 25 && !VM_IS_EMT(pVM)) /* give up early */
    260260            break;
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