Use #if for rest of defines.

This commit is contained in:
Milan Broz
2025-01-16 12:59:20 +01:00
parent d9404821a6
commit 1e441bf75c
5 changed files with 5 additions and 5 deletions

View File

@@ -128,7 +128,7 @@ void secure_wipe_memory(void *v, size_t n) {
void secure_wipe_memory(void *v, size_t n) {
memset_s(v, n, 0, n);
}
#elif defined(HAVE_EXPLICIT_BZERO)
#elif HAVE_EXPLICIT_BZERO
void secure_wipe_memory(void *v, size_t n) {
explicit_bzero(v, n);
}

View File

@@ -20,7 +20,7 @@
ATTR_NOINLINE ATTR_ZERO_REGS
void crypt_backend_memzero(void *s, size_t n)
{
#ifdef HAVE_EXPLICIT_BZERO
#if HAVE_EXPLICIT_BZERO
explicit_bzero(s, n);
#else
volatile uint8_t *p = (volatile uint8_t *)s;

View File

@@ -101,7 +101,7 @@ static void *token_dlvsym(struct crypt_device *cd,
char *error;
void *sym;
#ifdef HAVE_DLVSYM
#if HAVE_DLVSYM
log_dbg(cd, "Loading symbol %s@%s.", symbol, version);
sym = dlvsym(handle, symbol, version);
#else

View File

@@ -445,7 +445,7 @@ void tools_package_version(const char *name, bool use_pwlibs)
#elif defined(ENABLE_PASSWDQC)
passwdqc = true;
#endif
#ifdef HAVE_HW_OPAL
#if HAVE_HW_OPAL
hw_opal = true;
#endif
log_std("%s %s flags: %s%s%s%s%s%s%s%s\n", name, PACKAGE_VERSION,

View File

@@ -57,7 +57,7 @@ static void test_logf(int level, const char *format, ...)
static int check_dlvsym(void *h, const char *symbol, const char *version)
{
#ifdef HAVE_DLVSYM
#if HAVE_DLVSYM
void *sym;
char *err;