aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-11 00:18:36 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-06-11 00:18:36 +0200
commit54cba9a39fa14966d2df5423f14c628f352af5ac (patch)
treee5448d47d086df90170e55a7bdebd0f22adb1782
parent8782928ff807c49c921945109538e118e22e4590 (diff)
Use alignof() instead of hardcoding 8
-rw-r--r--src/lexer.c2
1 files changed, 1 insertions, 1 deletions
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;