summaryrefslogtreecommitdiffstats
path: root/src/btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/btree.c')
-rw-r--r--src/btree.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/btree.c b/src/btree.c
index cdb50fa..d824c23 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -48,9 +48,12 @@ struct ZixBTreeNodeImpl {
} data;
};
-#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112l) || \
- (defined(__cplusplus) && __cplusplus >= 201103L)
-static_assert(sizeof(ZixBTreeNode) == ZIX_BTREE_PAGE_SIZE, "");
+#if ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112l) || \
+ (defined(__cplusplus) && __cplusplus >= 201103L))
+static_assert(sizeof(ZixBTreeNode) <= ZIX_BTREE_PAGE_SIZE, "");
+static_assert(sizeof(ZixBTreeNode) >=
+ ZIX_BTREE_PAGE_SIZE - 2u * sizeof(ZixBTreeNode*),
+ "");
#endif
static ZixBTreeNode*