Merge "Replace dynamic assertion with a static one."
am: 67b77abfbc
Change-Id: I352b87f078a98cbec379850c6d23a4c460b33460
diff --git a/libese-hw/nxp/pn80t/common.c b/libese-hw/nxp/pn80t/common.c
index 12d1972..fd0cf3a 100644
--- a/libese-hw/nxp/pn80t/common.c
+++ b/libese-hw/nxp/pn80t/common.c
@@ -50,13 +50,8 @@
int nxp_pn80t_open(struct EseInterface *ese, void *board) {
struct NxpState *ns;
const struct Pn80tPlatform *platform;
- if (sizeof(ese->pad) < sizeof(struct NxpState *)) {
- /* This is a compile-time correctable error only. */
- ALOGE("Pad size too small to use NXP HW (%zu < %zu)", sizeof(ese->pad),
- sizeof(struct NxpState));
- ese_set_error(ese, kNxpPn80tErrorPlatformInit);
- return -1;
- }
+ _static_assert(sizeof(ese->pad) >= sizeof(struct NxpState *),
+ "Pad size too small to use NXP HW");
platform = ese->ops->opts;
/* Ensure all required functions exist */