summaryrefslogtreecommitdiffstats
path: root/src/shared/password-quality-util-pwquality.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-03-20 00:11:56 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-03-20 15:18:21 +0100
commit3a08372d18b0ec9d47f76bd41dbef225d8feeff2 (patch)
tree666863d56f658a1accb17036e3c91bdd58f86600 /src/shared/password-quality-util-pwquality.c
parentcore: use strdup_to() (diff)
downloadsystemd-3a08372d18b0ec9d47f76bd41dbef225d8feeff2.tar.xz
systemd-3a08372d18b0ec9d47f76bd41dbef225d8feeff2.zip
shared/password-quality: inline iterator variable
Diffstat (limited to '')
-rw-r--r--src/shared/password-quality-util-pwquality.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/shared/password-quality-util-pwquality.c b/src/shared/password-quality-util-pwquality.c
index 60816f8245..e070f9636c 100644
--- a/src/shared/password-quality-util-pwquality.c
+++ b/src/shared/password-quality-util-pwquality.c
@@ -101,7 +101,6 @@ int suggest_passwords(void) {
_cleanup_strv_free_erase_ char **suggestions = NULL;
_cleanup_(erase_and_freep) char *joined = NULL;
char buf[PWQ_MAX_ERROR_MESSAGE_LEN];
- size_t i;
int r;
r = pwq_allocate_context(&pwq);
@@ -115,7 +114,7 @@ int suggest_passwords(void) {
if (!suggestions)
return log_oom();
- for (i = 0; i < N_SUGGESTIONS; i++) {
+ for (size_t i = 0; i < N_SUGGESTIONS; i++) {
r = sym_pwquality_generate(pwq, 64, suggestions + i);
if (r < 0)
return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to generate password, ignoring: %s",