From 2e09a79ada1f6d92809a037d41895e3d9302ad59 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 7 Jun 2013 22:24:35 +0000 Subject: Avoid use of "register" as optimization hint. --- misc/getttyent.c | 14 +++++++------- misc/getusershell.c | 4 ++-- misc/syslog.c | 2 +- misc/ttyslot.c | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'misc') diff --git a/misc/getttyent.c b/misc/getttyent.c index b1e6376fb6..18944e2b99 100644 --- a/misc/getttyent.c +++ b/misc/getttyent.c @@ -47,7 +47,7 @@ struct ttyent * getttynam(tty) const char *tty; { - register struct ttyent *t; + struct ttyent *t; setttyent(); while ((t = getttyent())) @@ -64,8 +64,8 @@ struct ttyent * getttyent() { static struct ttyent tty; - register int c; - register char *p; + int c; + char *p; #define MAXLINELENGTH 100 static char line[MAXLINELENGTH]; @@ -142,10 +142,10 @@ libc_hidden_def (getttyent) static char * internal_function skip(p) - register char *p; + char *p; { - register char *t; - register int c, q; + char *t; + int c, q; for (q = 0, t = p; (c = *p) != '\0'; p++) { if (c == '"') { @@ -177,7 +177,7 @@ skip(p) static char * internal_function value(p) - register char *p; + char *p; { return ((p = index(p, '=')) ? ++p : NULL); diff --git a/misc/getusershell.c b/misc/getusershell.c index 2e8d97e65c..677377c3f7 100644 --- a/misc/getusershell.c +++ b/misc/getusershell.c @@ -95,8 +95,8 @@ setusershell() static char ** initshells() { - register char **sp, *cp; - register FILE *fp; + char **sp, *cp; + FILE *fp; struct stat64 statb; size_t flen; diff --git a/misc/syslog.c b/misc/syslog.c index 748361fc8c..4976e89b6e 100644 --- a/misc/syslog.c +++ b/misc/syslog.c @@ -229,7 +229,7 @@ __vsyslog_chk(int pri, int flag, const char *fmt, va_list ap) /* Output to stderr if requested. */ if (LogStat & LOG_PERROR) { struct iovec iov[2]; - register struct iovec *v = iov; + struct iovec *v = iov; v->iov_base = buf + msgoff; v->iov_len = bufsize - msgoff; diff --git a/misc/ttyslot.c b/misc/ttyslot.c index 5872f23fd0..75ca6a2d42 100644 --- a/misc/ttyslot.c +++ b/misc/ttyslot.c @@ -40,9 +40,9 @@ static char sccsid[] = "@(#)ttyslot.c 8.1 (Berkeley) 6/4/93"; int ttyslot() { - register struct ttyent *ttyp; - register int slot; - register char *p; + struct ttyent *ttyp; + int slot; + char *p; int cnt; size_t buflen = __sysconf (_SC_TTY_NAME_MAX) + 1; char *name; -- cgit 1.4.1