From 123f0f5bf00635e5dd7e5cbc73f906bf2a0bed9c Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Mon, 8 Dec 2014 22:20:55 +0000 Subject: [PATCH] lslogins: fix assertion failure for none existing logins This cange makes the following to retun none-zero value instead of a core dump. $ lslogins qwertyuiopasdfghjklzxcvbnm1234567 lslogins: libsmartcols/src/line.c:362: scols_line_get_cell: Assertion `ln' failed. Aborted (core dumped) Signed-off-by: Sami Kerola --- login-utils/lslogins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c index 7867404c9d..38d3cf681a 100644 --- a/login-utils/lslogins.c +++ b/login-utils/lslogins.c @@ -842,7 +842,7 @@ static int get_user(struct lslogins_control *ctl, struct lslogins_user **user, const char *username) { *user = get_user_info(ctl, username); - if (!*user && errno) + if (!*user) if (IS_REAL_ERRNO(errno)) return -1; return 0; -- 2.47.3