]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lslogins: remove duplicate errno initialization
authorChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Fri, 28 Nov 2025 06:17:03 +0000 (01:17 -0500)
committerChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Fri, 28 Nov 2025 06:17:03 +0000 (01:17 -0500)
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
login-utils/lslogins.c

index 2134d957d89c5c9e14263c34df8da5c50b5df6ff..96d0299c638a4d63b5e337b5f258b216bb555ab9 100644 (file)
@@ -800,7 +800,6 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c
        size_t n = 0;
        time_t time;
        uid_t uid;
-       errno = 0;
 
        errno = 0;
        pwd = username ? getpwnam(username) : getpwent();
@@ -1183,7 +1182,7 @@ static int create_usertree(struct lslogins_control *ctl)
                        int rc = get_user(ctl, &user, ctl->ulist[n]);
 
                        if (ctl->fail_on_unknown && !user) {
-                               warnx(_("cannot found '%s'"), ctl->ulist[n]);
+                               warnx(_("cannot find '%s'"), ctl->ulist[n]);
                                return -1;
                        }
                        if (rc || !user)