VirtualBox

Changeset 90794 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Aug 23, 2021 1:16:11 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
146429
Message:

*: More VALID_PTR -> RT_VALID_PTR/AssertPtr.

Location:
trunk/src/VBox/Additions/common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxControl/testcase/tstVBoxControl.cpp

    r82968 r90794  
    8888    static char szValue[] = "Value";
    8989    static char szFlags[] = "TRANSIENT";
    90     if (VALID_PTR(ppszValue))
     90    if (ppszValue)
    9191        *ppszValue = szValue;
    92     if (VALID_PTR(pu64Timestamp))
     92    if (pu64Timestamp)
    9393        *pu64Timestamp = 12345;
    94     if (VALID_PTR(ppszFlags))
     94    if (ppszFlags)
    9595        *ppszFlags = szFlags;
    96     if (VALID_PTR(pcbBufActual))
     96    if (pcbBufActual)
    9797        *pcbBufActual = 256;
    9898    return VINF_SUCCESS;
     
    129129    static char szFlags[] = "TRANSIENT";
    130130    *ppHandle = &Handle;
    131     if (VALID_PTR(ppszName))
     131    if (ppszName)
    132132        *ppszName = szName;
    133     if (VALID_PTR(ppszValue))
     133    if (ppszValue)
    134134        *ppszValue = szValue;
    135     if (VALID_PTR(pu64Timestamp))
     135    if (pu64Timestamp)
    136136        *pu64Timestamp = 12345;
    137     if (VALID_PTR(ppszFlags))
     137    if (ppszFlags)
    138138        *ppszFlags = szFlags;
    139139    return VINF_SUCCESS;
     
    148148    RT_NOREF1(pHandle);
    149149    RTPrintf("Called enumerate next...\n");
    150     AssertReturn(VALID_PTR(ppszName) || VALID_PTR(ppszValue) || VALID_PTR(ppszFlags),
     150    AssertReturn(RT_VALID_PTR(ppszName) || RT_VALID_PTR(ppszValue) || RT_VALID_PTR(ppszFlags),
    151151                 VERR_INVALID_POINTER);
    152     if (VALID_PTR(ppszName))
     152    if (ppszName)
    153153        *ppszName = NULL;
    154     if (VALID_PTR(ppszValue))
     154    if (ppszValue)
    155155        *ppszValue = NULL;
    156     if (VALID_PTR(pu64Timestamp))
     156    if (pu64Timestamp)
    157157        *pu64Timestamp = 0;
    158     if (VALID_PTR(ppszFlags))
     158    if (ppszFlags)
    159159        *ppszFlags = NULL;
    160160    return VINF_SUCCESS;
     
    191191    static char szValue[] = "Value";
    192192    static char szFlags[] = "TRANSIENT";
    193     if (VALID_PTR(ppszName))
     193    if (ppszName)
    194194        *ppszName = szName;
    195     if (VALID_PTR(ppszValue))
     195    if (ppszValue)
    196196        *ppszValue = szValue;
    197     if (VALID_PTR(pu64Timestamp))
     197    if (pu64Timestamp)
    198198        *pu64Timestamp = 12345;
    199     if (VALID_PTR(ppszFlags))
     199    if (ppszFlags)
    200200        *ppszFlags = szFlags;
    201     if (VALID_PTR(pcbBufActual))
     201    if (pcbBufActual)
    202202        *pcbBufActual = 256;
    203203    return VINF_SUCCESS;
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxDev-haiku.c

    r82968 r90794  
    162162     * Close the session if it's still hanging on to the device...
    163163     */
    164     if (VALID_PTR(pSession))
     164    if (RT_VALID_PTR(pSession))
    165165    {
    166166        VGDrvCommonCloseSession(&g_DevExt, pSession);
     
    191191     * Validate the input.
    192192     */
    193     if (RT_UNLIKELY(!VALID_PTR(pSession)))
     193    if (RT_UNLIKELY(!RT_VALID_PTR(pSession)))
    194194        return EINVAL;
    195195
     
    233233            return EFAULT;
    234234        }
    235         if (RT_UNLIKELY(!VALID_PTR(pvBuf)))
     235        if (RT_UNLIKELY(!RT_VALID_PTR(pvBuf)))
    236236        {
    237237            RTMemTmpFree(pvBuf);
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c

    r82968 r90794  
    289289     * Close the session if it's still hanging on to the device...
    290290     */
    291     if (VALID_PTR(pSession))
     291    if (RT_VALID_PTR(pSession))
    292292    {
    293293        VGDrvCommonCloseSession(&g_DevExt, pSession);
     
    518518
    519519    PVBOXGUESTSESSION pSession = (PVBOXGUESTSESSION)pDev->si_drv1;
    520     if (RT_UNLIKELY(!VALID_PTR(pSession))) {
     520    if (RT_UNLIKELY(!RT_VALID_PTR(pSession))) {
    521521        Log(("vgdrvFreeBSDPoll: no state data for %s\n", devtoname(pDev)));
    522522        return (fEvents & (POLLHUP|POLLIN|POLLRDNORM|POLLOUT|POLLWRNORM));
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