summaryrefslogtreecommitdiffstats
path: root/src/include/assert.h
diff options
context:
space:
mode:
authorMichael Brown2014-12-10 02:45:30 +0100
committerMichael Brown2014-12-12 11:18:03 +0100
commit67879f66eb7951760c38ff01f51a5ea7452b3747 (patch)
tree0001d094133840998f8fc9f345574d1af7261a8c /src/include/assert.h
parent[netdevice] Fix erroneous use of free(iobuf) instead of free_iob(iobuf) (diff)
downloadipxe-67879f66eb7951760c38ff01f51a5ea7452b3747.tar.gz
ipxe-67879f66eb7951760c38ff01f51a5ea7452b3747.tar.xz
ipxe-67879f66eb7951760c38ff01f51a5ea7452b3747.zip
[libc] Add ASSERTED macro to test if any assertion has triggered
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/assert.h')
-rw-r--r--src/include/assert.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/assert.h b/src/include/assert.h
index 655cbdc0..a33f6017 100644
--- a/src/include/assert.h
+++ b/src/include/assert.h
@@ -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