Bump to version 1.22.1
[platform/upstream/busybox.git] / miscutils / last_fancy.c
index f3ea037..f687d7e 100644 (file)
@@ -4,11 +4,10 @@
  *
  * Copyright (C) 2008 by Patricia Muscalu <patricia.muscalu@axis.com>
  *
- * Licensed under the GPLv2 or later, see the file LICENSE in this tarball.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
 
 #include "libbb.h"
-#include <utmp.h>
 
 /* NB: ut_name and ut_user are the same field, use only one name (ut_user)
  * to reduce confusion */
@@ -94,14 +93,14 @@ static void show_entry(struct utmp *ut, int state, time_t dur_secs)
        }
 
        printf(HEADER_FORMAT,
-                  ut->ut_user,
-                  ut->ut_line,
-                  show_wide ? INET6_ADDRSTRLEN : INET_ADDRSTRLEN,
-                  show_wide ? INET6_ADDRSTRLEN : INET_ADDRSTRLEN,
-                  ut->ut_host,
-                  login_time,
-                  logout_str,
-                  duration_str);
+               ut->ut_user,
+               ut->ut_line,
+               show_wide ? INET6_ADDRSTRLEN : INET_ADDRSTRLEN,
+               show_wide ? INET6_ADDRSTRLEN : INET_ADDRSTRLEN,
+               ut->ut_host,
+               login_time,
+               logout_str,
+               duration_str);
 }
 
 static int get_ut_type(struct utmp *ut)
@@ -162,11 +161,10 @@ int last_main(int argc UNUSED_PARAM, char **argv)
        time_t boot_time;
        time_t down_time;
        int file;
-       unsigned opt;
        smallint going_down;
        smallint boot_down;
 
-       opt = getopt32(argv, "Wf:" /* "H" */, &filename);
+       /*opt =*/ getopt32(argv, "Wf:" /* "H" */, &filename);
 #ifdef BUT_UTIL_LINUX_LAST_HAS_NO_SUCH_OPT
        if (opt & LAST_OPT_H) {
                /* Print header line */