Fix some compiler warnings emitted by gcc-4.8.0
[oweals/busybox.git] / miscutils / last.c
index 12457b1579623272895f43712d1d2deb4de9045b..24f6e1c7820ed49b8280a4b01826162cff275654 100644 (file)
@@ -7,6 +7,16 @@
  * Licensed under GPLv2, see file LICENSE in this source tree.
  */
 
+//usage:#define last_trivial_usage
+//usage:       ""IF_FEATURE_LAST_FANCY("[-HW] [-f FILE]")
+//usage:#define last_full_usage "\n\n"
+//usage:       "Show listing of the last users that logged into the system"
+//usage:       IF_FEATURE_LAST_FANCY( "\n"
+/* //usage:  "\n       -H      Show header line" */
+//usage:     "\n       -W      Display with no host column truncation"
+//usage:     "\n       -f FILE Read from FILE instead of /var/log/wtmp"
+//usage:       )
+
 #include "libbb.h"
 
 /* NB: ut_name and ut_user are the same field, use only one name (ut_user)
@@ -61,7 +71,7 @@ int last_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
        file = xopen(bb_path_wtmp_file, O_RDONLY);
 
        printf("%-10s %-14s %-18s %-12.12s %s\n",
-              "USER", "TTY", "HOST", "LOGIN", "TIME");
+               "USER", "TTY", "HOST", "LOGIN", "TIME");
        /* yikes. We reverse over the file and that is a not too elegant way */
        pos = xlseek(file, 0, SEEK_END);
        pos = lseek(file, pos - sizeof(ut), SEEK_SET);
@@ -121,7 +131,7 @@ int last_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
                 * but some systems have it wrong */
                t_tmp = (time_t)ut.ut_tv.tv_sec;
                printf("%-10s %-14s %-18s %-12.12s\n",
-                      ut.ut_user, ut.ut_line, ut.ut_host, ctime(&t_tmp) + 4);
+                       ut.ut_user, ut.ut_line, ut.ut_host, ctime(&t_tmp) + 4);
  next:
                pos -= sizeof(ut);
                if (pos <= 0)