diff options
author | Michael Brown <mcb30@ipxe.org> | 2024-01-16 12:23:02 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2024-01-16 13:35:08 +0000 |
commit | 6d29415c89d607b988381bc367c9c521694fa728 (patch) | |
tree | ab4a300dc7856a6fcbeb8b6f4db002e70d2f4e86 /src/image | |
parent | 6ca597eee9f95b846a3c2dc1231e63cfc02272c1 (diff) | |
download | ipxe-6d29415c89d607b988381bc367c9c521694fa728.tar.gz |
[libc] Make static_assert() available via assert.hassert
Expose static_assert() via assert.h and migrate link-time assertions
to build-time assertions where possible.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/image')
-rw-r--r-- | src/image/script.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/image/script.c b/src/image/script.c index 49b356403..9e8566bc5 100644 --- a/src/image/script.c +++ b/src/image/script.c @@ -219,8 +219,7 @@ static int script_exec ( struct image *image ) { static int script_probe ( struct image *image ) { static const char ipxe_magic[] = "#!ipxe"; static const char gpxe_magic[] = "#!gpxe"; - linker_assert ( sizeof ( ipxe_magic ) == sizeof ( gpxe_magic ), - magic_size_mismatch ); + static_assert ( sizeof ( ipxe_magic ) == sizeof ( gpxe_magic ) ); char test[ sizeof ( ipxe_magic ) - 1 /* NUL */ + 1 /* terminating space */]; |