From 378481ed1e0ae1d731243f8082d82013cf18c11e Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 5 May 2008 14:48:13 +0000 Subject: [PATCH] - fix strncmp'ing "runlevel" r21931 from trunk --- miscutils/last.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miscutils/last.c b/miscutils/last.c index f823a1385..de2d2bb51 100644 --- a/miscutils/last.c +++ b/miscutils/last.c @@ -49,7 +49,7 @@ int last_main(int argc, char **argv ATTRIBUTE_UNUSED) ut.ut_type = SHUTDOWN_TIME; else if (strncmp(ut.ut_user, "reboot", 6) == 0) ut.ut_type = BOOT_TIME; - else if (strncmp(ut.ut_user, "runlevel", 7) == 0) + else if (strncmp(ut.ut_user, "runlevel", 8) == 0) ut.ut_type = RUN_LVL; } else { if (ut.ut_name[0] == '\0' || strcmp(ut.ut_name, "LOGIN") == 0) { -- 2.25.1