2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Use static assertion to check for correct alignment size

This commit is contained in:
Ondřej Surý
2018-11-13 21:44:08 +01:00
committed by Mark Andrews
parent 5e44a1008f
commit de6f43d071

View File

@@ -747,7 +747,8 @@ isc_mem_createx(size_t init_max_size, size_t target_size,
REQUIRE(memalloc != NULL);
REQUIRE(memfree != NULL);
INSIST((ALIGNMENT_SIZE & (ALIGNMENT_SIZE - 1)) == 0);
STATIC_ASSERT((ALIGNMENT_SIZE & (ALIGNMENT_SIZE - 1)) == 0,
"wrong alignment size");
RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);