From b66839681f89d46698ea59076d766bec0ee12a03 Mon Sep 17 00:00:00 2001 From: sin Date: Sun, 1 Sep 2013 17:50:03 +0100 Subject: [PATCH] Ignore `LOGIN' name when counting the number of users --- uptime.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/uptime.c b/uptime.c index 0a3987f..bb776a9 100644 --- a/uptime.c +++ b/uptime.c @@ -51,6 +51,8 @@ main(int argc, char *argv[]) if (!*usr.ut_name || !*usr.ut_line || usr.ut_line[0] == '~') continue; + if (strcmp(usr.ut_name, "LOGIN") == 0) + continue; nusers++; } fclose(ufp);