VirtualBox

Changeset 10839

Show
Ignore:
Timestamp:
07/23/08 21:48:51 (3 months ago)
Author:
vboxsync
Message:

RTSemEventDestroy: Don't bitch on NIL_RTSEMEVENT.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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. 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy