VirtualBox

Changeset 27791 in vbox for trunk/src


Ignore:
Timestamp:
Mar 29, 2010 12:59:29 PM (15 years ago)
Author:
vboxsync
Message:

socket.cpp: build fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/socket.cpp

    r27787 r27791  
    421421    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    422422    AssertReturn(pThis->u32Magic == RTSOCKET_MAGIC, VERR_INVALID_HANDLE);
    423     AssertReturn(RTMemPoolRefCount(pThis) >= 1 + !!pThis->cUsers, VERR_CALLER_NO_REFERENCE);
     423    AssertReturn(RTMemPoolRefCount(pThis) >= (pThis->cUsers ? 2U : 1U), VERR_CALLER_NO_REFERENCE);
    424424
    425425    int rc = VINF_SUCCESS;
     
    575575    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    576576    AssertReturn(pThis->u32Magic == RTSOCKET_MAGIC, VERR_INVALID_HANDLE);
    577     AssertReturn(RTMemPoolRefCount(pThis) >= 1 + !!pThis->cUsers, VERR_CALLER_NO_REFERENCE);
     577    AssertReturn(RTMemPoolRefCount(pThis) >= (pThis->cUsers ? 2U : 1U), VERR_CALLER_NO_REFERENCE);
    578578
    579579    /*
     
    616616    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    617617    AssertReturn(pThis->u32Magic == RTSOCKET_MAGIC, VERR_INVALID_HANDLE);
    618     AssertReturn(RTMemPoolRefCount(pThis) >= 1 + !!pThis->cUsers, VERR_CALLER_NO_REFERENCE);
     618    AssertReturn(RTMemPoolRefCount(pThis) >= (pThis->cUsers ? 2U : 1U), VERR_CALLER_NO_REFERENCE);
    619619    AssertReturn(fRead || fWrite, VERR_INVALID_PARAMETER);
    620620
     
    686686    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    687687    AssertReturn(pThis->u32Magic == RTSOCKET_MAGIC, VERR_INVALID_HANDLE);
    688     AssertReturn(RTMemPoolRefCount(pThis) >= 1 + !!pThis->cUsers, VERR_CALLER_NO_REFERENCE);
     688    AssertReturn(RTMemPoolRefCount(pThis) >= (pThis->cUsers ? 2U : 1U), VERR_CALLER_NO_REFERENCE);
    689689
    690690    /*
     
    716716    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    717717    AssertReturn(pThis->u32Magic == RTSOCKET_MAGIC, VERR_INVALID_HANDLE);
    718     AssertReturn(RTMemPoolRefCount(pThis) >= 1 + !!pThis->cUsers, VERR_CALLER_NO_REFERENCE);
     718    AssertReturn(RTMemPoolRefCount(pThis) >= (pThis->cUsers ? 2U : 1U), VERR_CALLER_NO_REFERENCE);
    719719
    720720    /*
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