]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[libc] Add ASSERTED macro to test if any assertion has triggered
authorMichael Brown <mcb30@ipxe.org>
Wed, 10 Dec 2014 01:45:30 +0000 (01:45 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 12 Dec 2014 10:18:03 +0000 (10:18 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/assert.h

index 655cbdc03e14aa7eee12a41f2041b015d79903d1..a33f6017c175f35833e761f98302cc4f5413f30d 100644 (file)
@@ -20,6 +20,8 @@ FILE_LICENCE ( GPL2_OR_LATER );
 
 extern unsigned int assertion_failures;
 
+#define ASSERTED ( ASSERTING && ( assertion_failures != 0 ) )
+
 /** printf() for assertions
  *
  * This function exists so that the assert() macro can expand to