summaryrefslogtreecommitdiffstats
path: root/login-utils/last.c
diff options
context:
space:
mode:
authorSami Kerola2013-08-17 20:15:19 +0200
committerKarel Zak2013-08-23 10:59:03 +0200
commit751947b6fc64c989614f29fe844c0fe9f5e52c3f (patch)
tree6aa0525717ccade8bd793dbbedc88bf219b6d057 /login-utils/last.c
parentlast: use as narrow variable scoping as possible (diff)
downloadkernel-qcow2-util-linux-751947b6fc64c989614f29fe844c0fe9f5e52c3f.tar.gz
kernel-qcow2-util-linux-751947b6fc64c989614f29fe844c0fe9f5e52c3f.tar.xz
kernel-qcow2-util-linux-751947b6fc64c989614f29fe844c0fe9f5e52c3f.zip
last: global variables are initialize automatically to zero
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'login-utils/last.c')
-rw-r--r--login-utils/last.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/login-utils/last.c b/login-utils/last.c
index e94f1f038..e3add591a 100644
--- a/login-utils/last.c
+++ b/login-utils/last.c
@@ -74,13 +74,13 @@ enum {
};
/* Global variables */
-static unsigned int maxrecs = 0; /* Maximum number of records to list. */
-static unsigned int recsdone = 0; /* Number of records listed */
+static unsigned int maxrecs; /* Maximum number of records to list. */
+static unsigned int recsdone; /* Number of records listed */
static int showhost = 1; /* Show hostname too? */
-static int altlist = 0; /* Show hostname at the end. */
-static int usedns = 0; /* Use DNS to lookup the hostname. */
-static int useip = 0; /* Print IP address in number format */
-static int fulltime = 0; /* Print full dates and times */
+static int altlist; /* Show hostname at the end. */
+static int usedns; /* Use DNS to lookup the hostname. */
+static int useip; /* Print IP address in number format */
+static int fulltime; /* Print full dates and times */
static int name_len = 8; /* Default print 8 characters of name */
static int domain_len = 16; /* Default print 16 characters of domain */
static char **show = NULL; /* What do they want us to show */