diff options
author | Michael Brown <mcb30@etherboot.org> | 2007-01-04 13:48:13 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2007-01-04 13:48:13 +0000 |
commit | 350603cb86a408c46ba0d5c4b6be88fa550d5209 (patch) | |
tree | 3bd3252370beab8d7b97c7fcb39441ce98884ce3 /src/include/assert.h | |
parent | 20681d6168dcec08d6da78f47773fa053c5139f1 (diff) | |
download | ipxe-350603cb86a408c46ba0d5c4b6be88fa550d5209.tar.gz |
Don't include __FUNCTION__ in assert() messages; it was causing the
function name to appear within the objects even in non-asserting
builds. (This could be considered a gcc bug.)
Removing __FUNCTION__ from assert() reduces the size of bin/blib.a by
around 2.5%!
Diffstat (limited to 'src/include/assert.h')
-rw-r--r-- | src/include/assert.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/include/assert.h b/src/include/assert.h index e76ceb979..93750a1e8 100644 --- a/src/include/assert.h +++ b/src/include/assert.h @@ -38,13 +38,12 @@ assert_printf ( const char *fmt, ... ) asm ( "printf" ); * @todo Make an assertion failure abort the program * */ -#define assert( condition ) \ - do { \ - if ( ASSERTING && ! (condition) ) { \ - assert_printf ( "assert(%s) failed at %s line " \ - "%d [%s]\n", #condition, __FILE__, \ - __LINE__, __FUNCTION__ ); \ - } \ +#define assert( condition ) \ + do { \ + if ( ASSERTING && ! (condition) ) { \ + assert_printf ( "assert(%s) failed at %s line %d\n", \ + #condition, __FILE__, __LINE__ ); \ + } \ } while ( 0 ) /** |