Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
MAP: Move MAP-E/T to a plugin.
[vpp.git]
/
src
/
vppinfra
/
error_bootstrap.h
diff --git
a/src/vppinfra/error_bootstrap.h
b/src/vppinfra/error_bootstrap.h
index
3416c2f
..
248d389
100644
(file)
--- a/
src/vppinfra/error_bootstrap.h
+++ b/
src/vppinfra/error_bootstrap.h
@@
-88,6
+88,9
@@
do { \
#define STATIC_ASSERT_SIZEOF(d, s) \
STATIC_ASSERT (sizeof (d) == s, "Size of " #d " must be " # s " bytes")
#define STATIC_ASSERT_SIZEOF(d, s) \
STATIC_ASSERT (sizeof (d) == s, "Size of " #d " must be " # s " bytes")
+#define STATIC_ASSERT_OFFSET_OF(s, e, o) \
+ STATIC_ASSERT (STRUCT_OFFSET_OF(s,e) == o, "Offset of " #s "." #e " must be " # o)
+
/* Assert without allocating memory. */
#define ASSERT_AND_PANIC(truth) \
do { \
/* Assert without allocating memory. */
#define ASSERT_AND_PANIC(truth) \
do { \