From: Ondřej Surý Date: Tue, 13 Nov 2018 20:44:08 +0000 (+0100) Subject: Use static assertion to check for correct alignment size X-Git-Tag: v9.13.4~23^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de6f43d071b194bdcede74f340020a3ca6e05e83;p=thirdparty%2Fbind9.git Use static assertion to check for correct alignment size --- diff --git a/lib/isc/mem.c b/lib/isc/mem.c index 0b72e41e8d6..7a2691f481a 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -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);