VirtualBox

Changeset 5647 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Nov 9, 2007 2:01:58 PM (17 years ago)
Author:
vboxsync
Message:

use _NP macros in assert functions as the assert functions try to predict the value theirself

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/assert.h

    r4979 r5647  
    842842 */
    843843#define AssertMsgRC(rc, msg) \
    844     do { AssertMsg(RT_SUCCESS(rc), msg); NOREF(rc); } while (0)
     844    do { AssertMsg(RT_SUCCESS_NP(rc), msg); NOREF(rc); } while (0)
    845845
    846846/** @def AssertMsgRCReturn
     
    855855 */
    856856#define AssertMsgRCReturn(rc, msg, rcRet) \
    857     do { AssertMsgReturn(RT_SUCCESS(rc), msg, rcRet); NOREF(rc); } while (0)
     857    do { AssertMsgReturn(RT_SUCCESS_NP(rc), msg, rcRet); NOREF(rc); } while (0)
    858858
    859859/** @def AssertMsgRCReturnVoid
     
    867867 */
    868868#define AssertMsgRCReturnVoid(rc, msg) \
    869     do { AssertMsgReturnVoid(RT_SUCCESS(rc), msg); NOREF(rc); } while (0)
     869    do { AssertMsgReturnVoid(RT_SUCCESS_NP(rc), msg); NOREF(rc); } while (0)
    870870
    871871/** @def AssertMsgRCBreak
     
    880880 */
    881881#define AssertMsgRCBreak(rc, msg, stmt) \
    882     do { AssertMsgBreak(RT_SUCCESS(rc), msg, stmt); NOREF(rc); } while (0)
     882    do { AssertMsgBreak(RT_SUCCESS_NP(rc), msg, stmt); NOREF(rc); } while (0)
    883883
    884884/** @def AssertRCSuccess
     
    973973 * @remark  rc is references multiple times.
    974974 */
    975 #define AssertReleaseMsgRC(rc, msg)    AssertReleaseMsg(RT_SUCCESS(rc), msg)
     975#define AssertReleaseMsgRC(rc, msg)    AssertReleaseMsg(RT_SUCCESS_NP(rc), msg)
    976976
    977977/** @def AssertReleaseMsgRCReturn
     
    986986 * @remark  rc is references multiple times.
    987987 */
    988 #define AssertReleaseMsgRCReturn(rc, msg, rcRet)    AssertReleaseMsgReturn(RT_SUCCESS(rc), msg, rcRet)
     988#define AssertReleaseMsgRCReturn(rc, msg, rcRet)    AssertReleaseMsgReturn(RT_SUCCESS_NP(rc), msg, rcRet)
    989989
    990990/** @def AssertReleaseMsgRCReturnVoid
     
    998998 * @remark  rc is references multiple times.
    999999 */
    1000 #define AssertReleaseMsgRCReturnVoid(rc, msg)    AssertReleaseMsgReturnVoid(RT_SUCCESS(rc), msg)
     1000#define AssertReleaseMsgRCReturnVoid(rc, msg)    AssertReleaseMsgReturnVoid(RT_SUCCESS_NP(rc), msg)
    10011001
    10021002/** @def AssertReleaseMsgRCBreak
     
    10111011 * @remark  rc is references multiple times.
    10121012 */
    1013 #define AssertReleaseMsgRCBreak(rc, msg, stmt)    AssertReleaseMsgBreak(RT_SUCCESS(rc), msg, stmt)
     1013#define AssertReleaseMsgRCBreak(rc, msg, stmt)    AssertReleaseMsgBreak(RT_SUCCESS_NP(rc), msg, stmt)
    10141014
    10151015/** @def AssertReleaseRCSuccess
     
    10781078 * @remark  rc is references multiple times.
    10791079 */
    1080 #define AssertFatalMsgRC(rc, msg)   AssertFatalMsg(RT_SUCCESS(rc), msg)
     1080#define AssertFatalMsgRC(rc, msg)   AssertFatalMsg(RT_SUCCESS_NP(rc), msg)
    10811081
    10821082/** @def AssertFatalRCSuccess
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