Skip to content

Commit c6a7849

Browse files
committed
Use #if for password quality libs defines.
1 parent 29741d9 commit c6a7849

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/utils_password.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "cryptsetup.h"
1010
#include <termios.h>
1111

12-
#if defined ENABLE_PWQUALITY
12+
#if ENABLE_PWQUALITY
1313
#include <pwquality.h>
1414

1515
static int tools_check_pwquality(const char *password)
@@ -42,7 +42,7 @@ static int tools_check_pwquality(const char *password)
4242
pwquality_free_settings(pwq);
4343
return r;
4444
}
45-
#elif defined ENABLE_PASSWDQC
45+
#elif ENABLE_PASSWDQC
4646
#include <passwdqc.h>
4747

4848
static int tools_check_passwdqc(const char *password)
@@ -80,9 +80,9 @@ static int tools_check_passwdqc(const char *password)
8080
/* coverity[ +tainted_string_sanitize_content : arg-0 ] */
8181
static int tools_check_password(const char *password)
8282
{
83-
#if defined ENABLE_PWQUALITY
83+
#if ENABLE_PWQUALITY
8484
return tools_check_pwquality(password);
85-
#elif defined ENABLE_PASSWDQC
85+
#elif ENABLE_PASSWDQC
8686
return tools_check_passwdqc(password);
8787
#else
8888
UNUSED(password);

src/utils_tools.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,9 @@ void tools_package_version(const char *name, bool use_pwlibs)
440440
#if ENABLE_AF_ALG
441441
kernel_capi = true;
442442
#endif
443-
#if defined(ENABLE_PWQUALITY)
443+
#if ENABLE_PWQUALITY
444444
pwquality = true;
445-
#elif defined(ENABLE_PASSWDQC)
445+
#elif ENABLE_PASSWDQC
446446
passwdqc = true;
447447
#endif
448448
#if HAVE_HW_OPAL

0 commit comments

Comments
 (0)