diff options
author | Denis Vlasenko | 2007-01-29 22:51:44 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-01-29 22:51:44 +0000 |
commit | 06c0a71d2315756db874e98bc4f760ca3283b6a6 (patch) | |
tree | df385c84041f3fd8328e7a50caef4495ef2734a8 /loginutils/getty.c | |
parent | b6aae0f38194cd39960a898606ee65d4be93a895 (diff) | |
download | busybox-06c0a71d2315756db874e98bc4f760ca3283b6a6.zip busybox-06c0a71d2315756db874e98bc4f760ca3283b6a6.tar.gz |
preparatory patch for -Wwrite-strings #3
Diffstat (limited to 'loginutils/getty.c')
-rw-r--r-- | loginutils/getty.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c index f2c2b4a..8f81caf 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -33,7 +33,7 @@ #include <time.h> #if ENABLE_FEATURE_WTMP extern void updwtmp(const char *filename, const struct utmp *ut); -static void update_utmp(char *line); +static void update_utmp(const char *line); #endif #endif /* LOGIN_PROCESS */ @@ -85,10 +85,10 @@ static void update_utmp(char *line); struct options { int flags; /* toggle switches, see below */ unsigned timeout; /* time-out period */ - char *login; /* login program */ - char *tty; /* name of tty */ - char *initstring; /* modem init string */ - char *issue; /* alternative issue file */ + const char *login; /* login program */ + const char *tty; /* name of tty */ + const char *initstring; /* modem init string */ + const char *issue; /* alternative issue file */ int numspeed; /* number of baud rates to try */ int speeds[MAX_SPEED]; /* baud rates to be tried */ }; @@ -187,7 +187,7 @@ static void parse_args(int argc, char **argv, struct options *op) const char *p = op->initstring; char *q; - q = op->initstring = xstrdup(op->initstring); + op->initstring = q = xstrdup(op->initstring); /* copy optarg into op->initstring decoding \ddd octal codes into chars */ while (*p) { @@ -233,7 +233,7 @@ static void xdup2(int srcfd, int dstfd, const char *tty) } /* open_tty - set up tty as standard { input, output, error } */ -static void open_tty(char *tty, struct termios *tp, int local) +static void open_tty(const char *tty, struct termios *tp, int local) { int chdir_to_root = 0; @@ -655,7 +655,7 @@ static void termios_final(struct options *op, struct termios *tp, struct chardat #ifdef SYSV_STYLE #if ENABLE_FEATURE_UTMP /* update_utmp - update our utmp entry */ -static void update_utmp(char *line) +static void update_utmp(const char *line) { struct utmp ut; struct utmp *utp; |