VirtualBox

Changeset 8575

Show
Ignore:
Timestamp:
05/05/08 15:24:19 (8 months ago)
Author:
vboxsync
Message:

Fixed broken AssertMsgBreakVoid? macro.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/include/iprt/assert.h

    r8574 r8575  
    447447 * @param   a       printf argument list (in parenthesis). 
    448448 * @todo Rename to AssertMsgBreak. 
    449  * @todo broken, use if. 
    450449 */ 
    451450#ifdef RT_STRICT 
    452451# define AssertMsgBreakVoid(expr, a)  \ 
    453     do { \ 
    454         if (RT_UNLIKELY(!(expr))) \ 
    455         { \ 
    456             AssertMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \ 
    457             AssertMsg2 a; \ 
    458             AssertBreakpoint(); \ 
    459             break; \ 
    460         } \ 
    461     } while (0) 
     452    if (RT_UNLIKELY(!(expr))) \ 
     453    { \ 
     454        AssertMsg1(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \ 
     455        AssertMsg2 a; \ 
     456        AssertBreakpoint(); \ 
     457        break; \ 
     458    } else do {} while (0) 
    462459#else 
    463460# define AssertMsgBreakVoid(expr, a) \ 
    464     do { \ 
    465         if (RT_UNLIKELY(!(expr))) \ 
    466             break; \ 
    467     } while (0) 
     461    if (RT_UNLIKELY(!(expr))) \ 
     462        break; \ 
     463    else do {} while (0) 
    468464#endif 
    469465 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy