VirtualBox

Changeset 10839 in vbox for trunk/src/VBox/Runtime/r3


Ignore:
Timestamp:
Jul 23, 2008 7:48:51 PM (17 years ago)
Author:
vboxsync
Message:

RTSemEventDestroy: Don't bitch on NIL_RTSEMEVENT.

Location:
trunk/src/VBox/Runtime/r3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/linux/semevent-linux.cpp

    r8245 r10839  
    111111     * Validate input.
    112112     */
     113    if (EventSem == NIL_RTSEMEVENT)     /* don't bitch */
     114        return VERR_INVALID_HANDLE;
    113115    struct RTSEMEVENTINTERNAL *pThis = EventSem;
    114     AssertReturn(VALID_PTR(pThis) && pThis->iMagic == RTSEMEVENT_MAGIC,
    115                 VERR_INVALID_HANDLE);
     116    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
     117    AssertReturn(pThis->iMagic == RTSEMEVENT_MAGIC, VERR_INVALID_HANDLE);
    116118
    117119    /*
  • trunk/src/VBox/Runtime/r3/os2/sems-os2.cpp

    r8245 r10839  
    6666RTDECL(int)   RTSemEventDestroy(RTSEMEVENT EventSem)
    6767{
     68    if (EventSem == NIL_RTSEMEVENT)     /* don't bitch */
     69        return VERR_INVALID_HANDLE;
     70
    6871    /*
    6972     * Close semaphore handle.
  • trunk/src/VBox/Runtime/r3/posix/semevent-posix.cpp

    r8245 r10839  
    167167     * Validate handle.
    168168     */
     169    if (EventSem == NIL_RTSEMEVENT)     /* don't bitch */
     170        return VERR_INVALID_HANDLE;
    169171    if (!rtsemEventValid(EventSem))
    170172    {
  • trunk/src/VBox/Runtime/r3/win/sems-win.cpp

    r8651 r10839  
    6161    {
    6262        *pEventSem = (RTSEMEVENT)(void *)hev;
     63        Assert(*pEventSem != NIL_RTSEMEVENT);
    6364        return VINF_SUCCESS;
    6465    }
     
    6970RTDECL(int)   RTSemEventDestroy(RTSEMEVENT EventSem)
    7071{
     72    if (EventSem == NIL_RTSEMEVENT)     /* don't bitch */
     73        return VERR_INVALID_HANDLE;
     74
    7175    /*
    7276     * Close semaphore handle.
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