Since c/s 73b13705af7c ("firmware: provide a stand alone set of headers"),
we've had an implementation of offsetof() which isn't undefined behaviour.
Actually use it.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Wei Liu <wl@xen.org>
---
tools/firmware/hvmloader/util.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/tools/firmware/hvmloader/util.h b/tools/firmware/hvmloader/util.h
index 8d95eab28a65..ac7ff264e247 100644
--- a/tools/firmware/hvmloader/util.h
+++ b/tools/firmware/hvmloader/util.h
@@ -28,12 +28,6 @@ enum {
#define SEL_DATA32 0x0020
#define SEL_CODE64 0x0028
-#undef offsetof
-#define offsetof(t, m) ((unsigned long)&((t *)0)->m)
-
-#undef NULL
-#define NULL ((void*)0)
-
void __assert_failed(const char *assertion, const char *file, int line)
__attribute__((noreturn));
#define ASSERT(p) \
--
2.11.0