summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-26 16:01:40 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-26 16:01:40 -0700
commitfbe6fa7019309672c311184dd3bce3c25fb578d3 (patch)
treea6035581546f4e626dc3fa58e48f14e8a354caf0
parent18d68ce74bd810bc09f99a476798b8e4a66ec494 (diff)
Add const attributes to fix gcc -Wwrite-strings warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--sessreg.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sessreg.c b/sessreg.c
index d445498..03c05b6 100644
--- a/sessreg.c
+++ b/sessreg.c
@@ -89,13 +89,14 @@ static void set_utmpx (struct utmpx *u, const char *line, const char *user,
#endif
static int wflag, uflag, lflag;
-static char *wtmp_file, *utmp_file, *line;
+static const char *wtmp_file, *utmp_file;
+static char *line;
#ifdef USE_UTMPX
#ifdef HAVE_UPDWTMPX
-static char *wtmpx_file = NULL;
+static const char *wtmpx_file = NULL;
#endif
#ifdef HAVE_UTMPXNAME
-static char *utmpx_file = NULL;
+static const char *utmpx_file = NULL;
#endif
#endif
static int utmp_none, wtmp_none;
@@ -113,7 +114,7 @@ static char *xservers_file, *ttys_file;
static char *user_name;
static int aflag, dflag;
#ifdef USE_LASTLOG
-static char *llog_file;
+static const char *llog_file;
static int llog_none, Lflag;
#endif