summaryrefslogtreecommitdiffstats
path: root/src/include/assert.h
diff options
context:
space:
mode:
authorMichael Brown2007-01-04 14:48:13 +0100
committerMichael Brown2007-01-04 14:48:13 +0100
commit350603cb86a408c46ba0d5c4b6be88fa550d5209 (patch)
tree3bd3252370beab8d7b97c7fcb39441ce98884ce3 /src/include/assert.h
parentAllow empty checksums on received packets (diff)
downloadipxe-350603cb86a408c46ba0d5c4b6be88fa550d5209.tar.gz
ipxe-350603cb86a408c46ba0d5c4b6be88fa550d5209.tar.xz
ipxe-350603cb86a408c46ba0d5c4b6be88fa550d5209.zip
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.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/include/assert.h b/src/include/assert.h
index e76ceb97..93750a1e 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 )
/**