From bf66fbc8e2380717c1fab860cfc60c78582839dd Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 21 Dec 2006 13:23:14 +0000 Subject: introduce LONE_CHAR (optimized strcmp with one-char string) --- miscutils/last.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'miscutils') diff --git a/miscutils/last.c b/miscutils/last.c index 668f0c17d..fd1033bf7 100644 --- a/miscutils/last.c +++ b/miscutils/last.c @@ -44,7 +44,7 @@ int last_main(int argc, char **argv) bb_perror_msg_and_die("short read"); } - if (strncmp(ut.ut_line, "~", 1) == 0) { + if (ut.ut_line[0] == '~') { if (strncmp(ut.ut_user, "shutdown", 8) == 0) ut.ut_type = SHUTDOWN_TIME; else if (strncmp(ut.ut_user, "reboot", 6) == 0) -- cgit v1.2.3