From: Ruediger Meier Date: Thu, 1 Dec 2016 08:52:07 +0000 (+0100) Subject: utmpdump: code formatting for readability X-Git-Tag: v2.30-rc1~371 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f718c2fc7f7f144c3a41baabf1ebdbcd3f074e4d;p=thirdparty%2Futil-linux.git utmpdump: code formatting for readability BTW avoid using the defined sizes. Signed-off-by: Ruediger Meier --- diff --git a/login-utils/utmpdump.c b/login-utils/utmpdump.c index 8f438b0011..4a85afa7da 100644 --- a/login-utils/utmpdump.c +++ b/login-utils/utmpdump.c @@ -112,10 +112,12 @@ static void print_utline(struct utmp *ut, FILE *out) cleanse(ut->ut_line); cleanse(ut->ut_host); - /* pid id user line host addr time */ + /* type pid id user line host addr time */ fprintf(out, "[%d] [%05d] [%-4.4s] [%-*.*s] [%-*.*s] [%-*.*s] [%-15s] [%s]\n", - ut->ut_type, ut->ut_pid, ut->ut_id, 8, UT_NAMESIZE, ut->ut_user, - 12, UT_LINESIZE, ut->ut_line, 20, UT_HOSTSIZE, ut->ut_host, + ut->ut_type, ut->ut_pid, ut->ut_id, + 8, (int)sizeof(ut->ut_user), ut->ut_user, + 12, (int)sizeof(ut->ut_line), ut->ut_line, + 20, (int)sizeof(ut->ut_host), ut->ut_host, addr_string, time_string); }