summaryrefslogtreecommitdiffstats
path: root/login-utils/login.c
diff options
context:
space:
mode:
authorKarel Zak2011-10-03 17:28:57 +0200
committerKarel Zak2011-10-26 23:17:17 +0200
commitfc32d43e06667af31f416d038e6ccfe952dfc87b (patch)
treeade54921d373e54cd526b3fa7d99d79f6c1baf98 /login-utils/login.c
parentlogin: move signal stuff to the one place (diff)
downloadkernel-qcow2-util-linux-fc32d43e06667af31f416d038e6ccfe952dfc87b.tar.gz
kernel-qcow2-util-linux-fc32d43e06667af31f416d038e6ccfe952dfc87b.tar.xz
kernel-qcow2-util-linux-fc32d43e06667af31f416d038e6ccfe952dfc87b.zip
login: remove unnecessary variables
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/login.c')
-rw-r--r--login-utils/login.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/login-utils/login.c b/login-utils/login.c
index ff15c8f4c..b1ce3c28b 100644
--- a/login-utils/login.c
+++ b/login-utils/login.c
@@ -1041,10 +1041,8 @@ static void init_environ(struct login_context *cxt)
int main(int argc, char **argv)
{
- extern int optind;
- extern char *optarg, **environ;
- register int ch;
- register char *p;
+ int c;
+ char *p;
int cnt;
char *domain;
char tbuf[PATH_MAX + 2];
@@ -1083,8 +1081,8 @@ int main(int argc, char **argv)
gethostname(tbuf, sizeof(tbuf));
domain = strchr(tbuf, '.');
- while ((ch = getopt(argc, argv, "fh:p")) != -1)
- switch (ch) {
+ while ((c = getopt(argc, argv, "fh:p")) != -1)
+ switch (c) {
case 'f':
cxt.noauth = 1;
break;