diff options
| author | Michael Brown | 2006-03-23 20:33:57 +0100 |
|---|---|---|
| committer | Michael Brown | 2006-03-23 20:33:57 +0100 |
| commit | af23ff8a24a9de9b725335527529e5cc743311eb (patch) | |
| tree | 5208732478b9f9f1793931ad56adf2e394b7d324 /src/include/dev.h | |
| parent | Added missing #endif (diff) | |
| download | ipxe-af23ff8a24a9de9b725335527529e5cc743311eb.tar.gz ipxe-af23ff8a24a9de9b725335527529e5cc743311eb.tar.xz ipxe-af23ff8a24a9de9b725335527529e5cc743311eb.zip | |
Assertions are now handled via the POSIX-like <assert.h>.
Diffstat (limited to 'src/include/dev.h')
| -rw-r--r-- | src/include/dev.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/include/dev.h b/src/include/dev.h index d6e31dabb..fa549deb2 100644 --- a/src/include/dev.h +++ b/src/include/dev.h @@ -6,6 +6,7 @@ #include "buffer.h" #include "dhcp.h" /* for dhcp_dev_id */ #include "tables.h" +#include <assert.h> /* * Forward declarations @@ -100,17 +101,11 @@ struct bus_dev { * */ -#define LINKER_ASSERT(test,error_symbol) \ - if ( ! (test) ) { \ - extern void error_symbol ( void ); \ - error_symbol(); \ - } - #define BUS_LOC_CHECK(datatype) \ - LINKER_ASSERT( ( sizeof (datatype) <= sizeof (struct bus_loc) ), \ + linker_assert( ( sizeof (datatype) <= sizeof (struct bus_loc) ), \ __BUS_LOC_SIZE_is_too_small__see_dev_h ) #define BUS_DEV_CHECK(datatype) \ - LINKER_ASSERT( ( sizeof (datatype) <= sizeof (struct bus_dev) ), \ + linker_assert( ( sizeof (datatype) <= sizeof (struct bus_dev) ), \ __BUS_DEV_SIZE_is_too_small__see_dev_h ) /* |
