aboutsummaryrefslogtreecommitdiff
path: root/miscutils/last.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/last.c')
-rw-r--r--miscutils/last.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/miscutils/last.c b/miscutils/last.c
index 24f6e1c78..a144c7e47 100644
--- a/miscutils/last.c
+++ b/miscutils/last.c
@@ -87,11 +87,11 @@ int last_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
87 if (++n > 0) 87 if (++n > 0)
88 ut.ut_type = n != 3 ? n : SHUTDOWN_TIME; 88 ut.ut_type = n != 3 ? n : SHUTDOWN_TIME;
89#else 89#else
90 if (strncmp(ut.ut_user, "shutdown", 8) == 0) 90 if (is_prefixed_with(ut.ut_user, "shutdown"))
91 ut.ut_type = SHUTDOWN_TIME; 91 ut.ut_type = SHUTDOWN_TIME;
92 else if (strncmp(ut.ut_user, "reboot", 6) == 0) 92 else if (is_prefixed_with(ut.ut_user, "reboot"))
93 ut.ut_type = BOOT_TIME; 93 ut.ut_type = BOOT_TIME;
94 else if (strncmp(ut.ut_user, "runlevel", 8) == 0) 94 else if (is_prefixed_with(ut.ut_user, "runlevel"))
95 ut.ut_type = RUN_LVL; 95 ut.ut_type = RUN_LVL;
96#endif 96#endif
97 } else { 97 } else {