VirtualBox

Changeset 90792 in vbox for trunk/include


Ignore:
Timestamp:
Aug 23, 2021 10:29:03 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
146427
Message:

*: More VALID_PTR -> RT_VALID_PTR/AssertPtr.

Location:
trunk/include
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/HostServices/GuestPropertySvc.h

    r82968 r90792  
    125125    int rc = VINF_SUCCESS;
    126126    uint32_t fFlags = 0;
    127     AssertLogRelReturn(VALID_PTR(pfFlags), VERR_INVALID_POINTER);
     127    AssertLogRelReturn(RT_VALID_PTR(pfFlags), VERR_INVALID_POINTER);
    128128
    129129    if (pcszFlags)
     
    182182    int rc = VINF_SUCCESS;
    183183
    184     AssertLogRelReturn(VALID_PTR(pszFlags), VERR_INVALID_POINTER);
     184    AssertLogRelReturn(RT_VALID_PTR(pszFlags), VERR_INVALID_POINTER);
    185185    if ((fFlags & ~GUEST_PROP_F_ALLFLAGS) == GUEST_PROP_F_NILFLAG)
    186186    {
  • trunk/include/VBox/HostServices/Service.h

    r90237 r90792  
    161161        int rc = VINF_SUCCESS;
    162162
    163         if (!VALID_PTR(pTable))
     163        if (!RT_VALID_PTR(pTable))
    164164            rc = VERR_INVALID_PARAMETER;
    165165        else
     
    242242    static DECLCALLBACK(int) svcUnload(void *pvService)
    243243    {
    244         AssertLogRelReturn(VALID_PTR(pvService), VERR_INVALID_PARAMETER);
     244        AssertLogRelReturn(RT_VALID_PTR(pvService), VERR_INVALID_PARAMETER);
    245245        SELF *pSelf = reinterpret_cast<SELF *>(pvService);
    246246        int rc = pSelf->uninit();
     
    262262    {
    263263        RT_NOREF(fRequestor, fRestoring);
    264         AssertLogRelReturn(VALID_PTR(pvService), VERR_INVALID_PARAMETER);
     264        AssertLogRelReturn(RT_VALID_PTR(pvService), VERR_INVALID_PARAMETER);
    265265        LogFlowFunc(("pvService=%p, idClient=%u, pvClient=%p\n", pvService, idClient, pvClient));
    266266        SELF *pSelf = reinterpret_cast<SELF *>(pvService);
     
    278278                                           void *pvClient)
    279279    {
    280         AssertLogRelReturn(VALID_PTR(pvService), VERR_INVALID_PARAMETER);
     280        AssertLogRelReturn(RT_VALID_PTR(pvService), VERR_INVALID_PARAMETER);
    281281        LogFlowFunc(("pvService=%p, idClient=%u, pvClient=%p\n", pvService, idClient, pvClient));
    282282        SELF *pSelf = reinterpret_cast<SELF *>(pvService);
     
    299299                                      uint64_t tsArrival)
    300300    {
    301         AssertLogRelReturnVoid(VALID_PTR(pvService));
     301        AssertLogRelReturnVoid(RT_VALID_PTR(pvService));
    302302        LogFlowFunc(("pvService=%p, callHandle=%p, idClient=%u, pvClient=%p, u32Function=%u, cParms=%u, paParms=%p\n",
    303303                     pvService, callHandle, idClient, pvClient, u32Function, cParms, paParms));
     
    317317                                         VBOXHGCMSVCPARM paParms[])
    318318    {
    319         AssertLogRelReturn(VALID_PTR(pvService), VERR_INVALID_PARAMETER);
     319        AssertLogRelReturn(RT_VALID_PTR(pvService), VERR_INVALID_PARAMETER);
    320320        LogFlowFunc(("pvService=%p, u32Function=%u, cParms=%u, paParms=%p\n", pvService, u32Function, cParms, paParms));
    321321        SELF *pSelf = reinterpret_cast<SELF *>(pvService);
     
    333333                                                  void *pvExtension)
    334334    {
    335         AssertLogRelReturn(VALID_PTR(pvService), VERR_INVALID_PARAMETER);
     335        AssertLogRelReturn(RT_VALID_PTR(pvService), VERR_INVALID_PARAMETER);
    336336        LogFlowFunc(("pvService=%p, pfnExtension=%p, pvExtention=%p\n", pvService, pfnExtension, pvExtension));
    337337        SELF *pSelf = reinterpret_cast<SELF *>(pvService);
  • trunk/include/VBox/hgcmsvc.h

    r90238 r90792  
    314314    AssertPtrReturn(pcb, VERR_INVALID_POINTER);
    315315    if (   pParm->type == VBOX_HGCM_SVC_PARM_PTR
    316         && VALID_PTR(pParm->u.pointer.addr)
     316        && RT_VALID_PTR(pParm->u.pointer.addr)
    317317        && pParm->u.pointer.size > 0)
    318318    {
     
    333333    AssertPtrReturn(pcb, VERR_INVALID_POINTER);
    334334    if (   pParm->type == VBOX_HGCM_SVC_PARM_PTR
    335         && VALID_PTR(pParm->u.pointer.addr)
     335        && RT_VALID_PTR(pParm->u.pointer.addr)
    336336        && pParm->u.pointer.size > 0)
    337337    {
     
    351351    AssertPtrReturn(pcb, VERR_INVALID_POINTER);
    352352    if (   pParm->type == VBOX_HGCM_SVC_PARM_PTR
    353         && VALID_PTR(pParm->u.pointer.addr)
     353        && RT_VALID_PTR(pParm->u.pointer.addr)
    354354        && pParm->u.pointer.size > 0)
    355355    {
     
    374374    AssertPtrReturn(pcb, VERR_INVALID_POINTER);
    375375    if (   pParm->type == VBOX_HGCM_SVC_PARM_PTR
    376         && VALID_PTR(pParm->u.pointer.addr)
     376        && RT_VALID_PTR(pParm->u.pointer.addr)
    377377        && pParm->u.pointer.size > 0)
    378378    {
     
    397397    AssertPtrReturn(pcb, VERR_INVALID_POINTER);
    398398    if (   pParm->type == VBOX_HGCM_SVC_PARM_PTR
    399         && VALID_PTR(pParm->u.pointer.addr)
     399        && RT_VALID_PTR(pParm->u.pointer.addr)
    400400        && pParm->u.pointer.size > 0)
    401401    {
  • trunk/include/VBox/vd-ifs.h

    r85901 r90792  
    160160                    ("enmInterface=%u", enmInterface), VERR_INVALID_PARAMETER);
    161161
    162     AssertMsgReturn(VALID_PTR(ppVDIfs),
    163                     ("pInterfaceList=%#p", ppVDIfs),
    164                     VERR_INVALID_PARAMETER);
     162    AssertPtrReturn(ppVDIfs, VERR_INVALID_PARAMETER);
    165163
    166164    /* Fill out interface descriptor. */
     
    190188
    191189    /* Argument checks. */
    192     AssertMsgReturn(VALID_PTR(pInterface),
    193                     ("pInterface=%#p", pInterface),
    194                     VERR_INVALID_PARAMETER);
    195 
    196     AssertMsgReturn(VALID_PTR(ppVDIfs),
    197                     ("pInterfaceList=%#p", ppVDIfs),
    198                     VERR_INVALID_PARAMETER);
     190    AssertPtrReturn(pInterface, VERR_INVALID_PARAMETER);
     191    AssertPtrReturn(ppVDIfs, VERR_INVALID_PARAMETER);
    199192
    200193    if (*ppVDIfs)
  • trunk/include/iprt/assert.h

    r82968 r90792  
    25722572 * @param   pv      The pointer.
    25732573 */
    2574 #define AssertPtr(pv)                   AssertMsg(VALID_PTR(pv), ("%p\n", (pv)))
     2574#define AssertPtr(pv)                   AssertMsg(RT_VALID_PTR(pv), ("%p\n", (pv)))
    25752575
    25762576/** @def AssertPtrReturn
     
    25802580 * @param   rcRet   What is to be presented to return.
    25812581 */
    2582 #define AssertPtrReturn(pv, rcRet)      AssertMsgReturn(VALID_PTR(pv), ("%p\n", (pv)), rcRet)
     2582#define AssertPtrReturn(pv, rcRet)      AssertMsgReturn(RT_VALID_PTR(pv), ("%p\n", (pv)), rcRet)
    25832583
    25842584/** @def AssertPtrReturnVoid
     
    25872587 * @param   pv      The pointer.
    25882588 */
    2589 #define AssertPtrReturnVoid(pv)         AssertMsgReturnVoid(VALID_PTR(pv), ("%p\n", (pv)))
     2589#define AssertPtrReturnVoid(pv)         AssertMsgReturnVoid(RT_VALID_PTR(pv), ("%p\n", (pv)))
    25902590
    25912591/** @def AssertPtrBreak
     
    25942594 * @param   pv      The pointer.
    25952595 */
    2596 #define AssertPtrBreak(pv)              AssertMsgBreak(VALID_PTR(pv), ("%p\n", (pv)))
     2596#define AssertPtrBreak(pv)              AssertMsgBreak(RT_VALID_PTR(pv), ("%p\n", (pv)))
    25972597
    25982598/** @def AssertPtrBreakStmt
     
    26022602 * @param   stmt    Statement to execute before break in case of a failed assertion.
    26032603 */
    2604 #define AssertPtrBreakStmt(pv, stmt)    AssertMsgBreakStmt(VALID_PTR(pv), ("%p\n", (pv)), stmt)
     2604#define AssertPtrBreakStmt(pv, stmt)    AssertMsgBreakStmt(RT_VALID_PTR(pv), ("%p\n", (pv)), stmt)
    26052605
    26062606/** @def AssertPtrNull
     
    26092609 * @param   pv      The pointer.
    26102610 */
    2611 #define AssertPtrNull(pv)               AssertMsg(VALID_PTR(pv) || (pv) == NULL, ("%p\n", (pv)))
     2611#define AssertPtrNull(pv)               AssertMsg(RT_VALID_PTR(pv) || (pv) == NULL, ("%p\n", (pv)))
    26122612
    26132613/** @def AssertPtrNullReturn
     
    26172617 * @param   rcRet   What is to be presented to return.
    26182618 */
    2619 #define AssertPtrNullReturn(pv, rcRet)  AssertMsgReturn(VALID_PTR(pv) || (pv) == NULL, ("%p\n", (pv)), rcRet)
     2619#define AssertPtrNullReturn(pv, rcRet)  AssertMsgReturn(RT_VALID_PTR(pv) || (pv) == NULL, ("%p\n", (pv)), rcRet)
    26202620
    26212621/** @def AssertPtrNullReturnVoid
     
    26242624 * @param   pv      The pointer.
    26252625 */
    2626 #define AssertPtrNullReturnVoid(pv)     AssertMsgReturnVoid(VALID_PTR(pv) || (pv) == NULL, ("%p\n", (pv)))
     2626#define AssertPtrNullReturnVoid(pv)     AssertMsgReturnVoid(RT_VALID_PTR(pv) || (pv) == NULL, ("%p\n", (pv)))
    26272627
    26282628/** @def AssertPtrNullBreak
     
    26312631 * @param   pv      The pointer.
    26322632 */
    2633 #define AssertPtrNullBreak(pv)          AssertMsgBreak(VALID_PTR(pv) || (pv) == NULL, ("%p\n", (pv)))
     2633#define AssertPtrNullBreak(pv)          AssertMsgBreak(RT_VALID_PTR(pv) || (pv) == NULL, ("%p\n", (pv)))
    26342634
    26352635/** @def AssertPtrNullBreakStmt
     
    26392639 * @param   stmt    Statement to execute before break in case of a failed assertion.
    26402640 */
    2641 #define AssertPtrNullBreakStmt(pv, stmt) AssertMsgBreakStmt(VALID_PTR(pv) || (pv) == NULL, ("%p\n", (pv)), stmt)
     2641#define AssertPtrNullBreakStmt(pv, stmt) AssertMsgBreakStmt(RT_VALID_PTR(pv) || (pv) == NULL, ("%p\n", (pv)), stmt)
    26422642
    26432643/** @def AssertGCPhys32
  • trunk/include/iprt/cdefs.h

    r90647 r90792  
    43944394#define RT_VALID_ALIGNED_PTR(ptr, align)   \
    43954395    (   !((uintptr_t)(ptr) & (uintptr_t)((align) - 1)) \
    4396      && VALID_PTR(ptr) )
     4396     && RT_VALID_PTR(ptr) )
    43974397
    43984398
Note: See TracChangeset for help on using the changeset viewer.

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