]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/pwdutils: fix compiler warning [-Werror=maybe-uninitialized]
authorKarel Zak <kzak@redhat.com>
Wed, 15 Apr 2026 11:27:06 +0000 (13:27 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 15 Apr 2026 11:27:06 +0000 (13:27 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/pwdutils.c

index 64a7af6f66eaaefc2de747c67ab2337817da673f..374a3b174fd6e6d43d59fff473ff19c5d3fa398b 100644 (file)
@@ -172,7 +172,7 @@ char *xgetlogin(void)
 struct group *ul_getgrp_str(const char *str, gid_t *result)
 {
        int rc;
-       uint64_t num;
+       uint64_t num = 0;
        struct group *gr;
 
        if (result)
@@ -217,7 +217,7 @@ struct group *ul_getgrp_str(const char *str, gid_t *result)
 struct passwd *ul_getuserpw_str(const char *str, uid_t *result)
 {
        int rc;
-       uint64_t num;
+       uint64_t num = 0;
        struct passwd *pw;
 
        if (result)