]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
login: remove unnecessary variables
authorKarel Zak <kzak@redhat.com>
Mon, 3 Oct 2011 15:28:57 +0000 (17:28 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 26 Oct 2011 21:17:17 +0000 (23:17 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/login.c

index ff15c8f4cc95157cd194c5ce55120bdcdca5ccd3..b1ce3c28b50638fa21b55436894b150b1302dcce 100644 (file)
@@ -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;