From 54cba9a39fa14966d2df5423f14c628f352af5ac Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 11 Jun 2024 00:18:36 +0200 Subject: Use alignof() instead of hardcoding 8 --- src/lexer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lexer.c b/src/lexer.c index 4a71746..8b121b3 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -166,7 +166,7 @@ lexemes_soa_resz(struct lexemes_soa *soa) /* Ensure that soa->strs is properly aligned */ pad = alignof(*soa->strs) - ncap * sizeof(*soa->kinds) % alignof(*soa->strs); - if (pad == 8) + if (pad == alignof(*soa->strs)) pad = 0; newsz = ncap * LEXEMES_SOA_BLKSZ + pad; -- cgit v1.2.3