Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 1e591c8 in mainline


Ignore:
Timestamp:
2011-07-26T22:19:07Z (10 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
Children:
77c6698
Parents:
eb1edb0
Message:

Cleaner assert().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/assert.h

    reb1edb0 r1e591c8  
    4040
    4141#ifndef NDEBUG
    42         #define assert(expr) \
    43                 do { \
    44                         if (!(expr)) { \
    45                                 assert_abort(#expr, __FILE__, __LINE__); \
    46                         } \
    47                 } while (0)
     42        #define assert(expr) ((expr) ? (void) 0 : assert_abort(#expr, __FILE__, __LINE__))
    4843#else
    4944        #define assert(expr) ((void) 0)
Note: See TracChangeset for help on using the changeset viewer.