summaryrefslogtreecommitdiff
path: root/sessreg.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-19 15:47:29 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-19 15:47:29 -0200
commit3ba14d85abede72a40c5ba8fe18d1a2e1625d19e (patch)
tree4c76b071bb26c96249ea164e1849d31568dfca5a /sessreg.c
parent3db21d655b0a2988ae0fd47e360d29bb8763cd03 (diff)
Ansification and compile warning fixes.
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects make distcheck and all gcc 4.3 and sparse warnings.
Diffstat (limited to 'sessreg.c')
-rw-r--r--sessreg.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/sessreg.c b/sessreg.c
index eed1816..bdd82bf 100644
--- a/sessreg.c
+++ b/sessreg.c
@@ -96,28 +96,28 @@ static void set_utmpx (struct utmpx *u, const char *line, const char *user,
const char *host, Time_t date, int addp);
#endif
-int wflag, uflag, lflag;
-char *wtmp_file, *utmp_file, *line;
+static int wflag, uflag, lflag;
+static char *wtmp_file, *utmp_file, *line;
#ifdef USE_UTMPX
static char *wtmpx_file = NULL, *utmpx_file = NULL;
#endif
-int utmp_none, wtmp_none;
+static int utmp_none, wtmp_none;
/*
* BSD specific variables. To make life much easier for Xstartup/Xreset
* maintainers, these arguments are accepted but ignored for sysV
*/
-int hflag, sflag, xflag, tflag;
-char *host_name = NULL;
-int slot_number;
-char *xservers_file, *ttys_file;
-char *user_name;
-int aflag, dflag;
+static int hflag, sflag, xflag, tflag;
+static char *host_name = NULL;
+static int slot_number;
+static char *xservers_file, *ttys_file;
+static char *user_name;
+static int aflag, dflag;
#ifndef NO_LASTLOG
-char *llog_file;
-int llog_none, Lflag;
+static char *llog_file;
+static int llog_none, Lflag;
#endif
-char *program_name;
+static char *program_name;
#ifndef SYSV
static int findslot (char *line_name, char *host_name, int addp, int slot);
@@ -239,7 +239,7 @@ main (int argc, char **argv)
}
}
usage (!(user_name = *argv++));
- usage (*argv != 0);
+ usage (*argv != NULL);
/*
* complain if neither aflag nor dflag are set,
* or if both are set.