Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/chown - Make some global variable function local.



details:   https://anonhg.NetBSD.org/src/rev/2cf0677aef2d
branches:  trunk
changeset: 495748:2cf0677aef2d
user:      enami <enami%NetBSD.org@localhost>
date:      Fri Aug 04 07:44:07 2000 +0000

description:
- Make some global variable function local.
- Remove whitespace at the end of line.
- Put an empty line if function has no local variable.

diffstat:

 usr.sbin/chown/chown.c |  17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r 0fb84189f6fe -r 2cf0677aef2d usr.sbin/chown/chown.c
--- a/usr.sbin/chown/chown.c    Fri Aug 04 07:33:55 2000 +0000
+++ b/usr.sbin/chown/chown.c    Fri Aug 04 07:44:07 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chown.c,v 1.21 2000/05/10 12:22:34 darrenr Exp $       */
+/*     $NetBSD: chown.c,v 1.22 2000/08/04 07:44:07 enami Exp $ */
 
 /*
  * Copyright (c) 1988, 1993, 1994
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)chown.c    8.8 (Berkeley) 4/4/94";
 #else
-__RCSID("$NetBSD: chown.c,v 1.21 2000/05/10 12:22:34 darrenr Exp $");
+__RCSID("$NetBSD: chown.c,v 1.22 2000/08/04 07:44:07 enami Exp $");
 #endif
 #endif /* not lint */
 
@@ -71,7 +71,7 @@
 
 static uid_t uid;
 static gid_t gid;
-static int Rflag, ischown, fflag;
+static int ischown;
 static char *myname;
 
 int
@@ -81,15 +81,15 @@
 {
        FTS *ftsp;
        FTSENT *p;
-       int Hflag, Lflag, ch, fts_options, hflag, rval;
+       int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval;
        char *cp;
        int (*change_owner) __P((const char *, uid_t, gid_t));
-       
+
        (void)setlocale(LC_ALL, "");
 
        myname = (cp = strrchr(*argv, '/')) ? cp + 1 : *argv;
        ischown = (myname[2] == 'o');
-       
+
        Hflag = Lflag = hflag = 0;
        while ((ch = getopt(argc, argv, "HLPRfh")) != -1)
                switch (ch) {
@@ -152,7 +152,7 @@
                if ((cp = strchr(*argv, ':')) != NULL) {
                        *cp++ = '\0';
                        a_gid(cp);
-               } 
+               }
 #ifdef SUPPORT_DOT
                else if ((cp = strrchr(*argv, '.')) != NULL) {
                        if (a_uid(*argv) == -1) {
@@ -162,7 +162,7 @@
                }
 #endif
                (void) a_uid(*argv);
-       } else 
+       } else
                a_gid(*argv);
 
        if ((ftsp = fts_open(++argv, fts_options, NULL)) == NULL)
@@ -258,6 +258,7 @@
 static void
 usage()
 {
+
        (void)fprintf(stderr,
            "usage: %s [-R [-H | -L | -P]] [-fh] %s file ...\n",
            myname, ischown ? "[owner][:group]" : "group");



Home | Main Index | Thread Index | Old Index