diff --git a/usr.sbin/mtree/compare.c b/usr.sbin/mtree/compare.c index 1732d13f766a..9008e1d90fa8 100644 --- a/usr.sbin/mtree/compare.c +++ b/usr.sbin/mtree/compare.c @@ -74,10 +74,7 @@ static const char *ftype(u_int); } int -compare(name, s, p) - char *name __unused; - register NODE *s; - register FTSENT *p; +compare(char *name __unused, NODE *s, FTSENT *p) { uint32_t val; int fd, label; @@ -307,8 +304,7 @@ typeerr: LABEL; } const char * -inotype(type) - u_int type; +inotype(u_int type) { switch(type & S_IFMT) { case S_IFBLK: @@ -332,8 +328,7 @@ inotype(type) } static const char * -ftype(type) - u_int type; +ftype(u_int type) { switch(type) { case F_BLOCK: @@ -357,11 +352,10 @@ ftype(type) } char * -rlink(name) - char *name; +rlink(char *name) { static char lbuf[MAXPATHLEN]; - register int len; + int len; if ((len = readlink(name, lbuf, sizeof(lbuf) - 1)) == -1) err(1, "line %d: %s", lineno, name); diff --git a/usr.sbin/mtree/create.c b/usr.sbin/mtree/create.c index a42f8102c1a5..420ac5ba1721 100644 --- a/usr.sbin/mtree/create.c +++ b/usr.sbin/mtree/create.c @@ -85,10 +85,10 @@ static int statd(FTS *, FTSENT *, uid_t *, gid_t *, mode_t *, u_long *); static void statf(int, FTSENT *); void -cwalk() +cwalk(void) { - register FTS *t; - register FTSENT *p; + FTS *t; + FTSENT *p; time_t cl; char *argv[2], host[MAXHOSTNAMELEN]; char dot[] = "."; @@ -145,9 +145,7 @@ cwalk() } static void -statf(indent, p) - int indent; - FTSENT *p; +statf(int indent, FTSENT *p) { struct group *gr; struct passwd *pw; @@ -274,19 +272,13 @@ statf(indent, p) #define MAXS 16 static int -statd(t, parent, puid, pgid, pmode, pflags) - FTS *t; - FTSENT *parent; - uid_t *puid; - gid_t *pgid; - mode_t *pmode; - u_long *pflags; +statd(FTS *t, FTSENT *parent, uid_t *puid, gid_t *pgid, mode_t *pmode, u_long *pflags) { - register FTSENT *p; - register gid_t sgid; - register uid_t suid; - register mode_t smode; - register u_long sflags; + FTSENT *p; + gid_t sgid; + uid_t suid; + mode_t smode; + u_long sflags; struct group *gr; struct passwd *pw; gid_t savegid = *pgid; @@ -397,8 +389,7 @@ statd(t, parent, puid, pgid, pmode, pflags) } static int -dsort(a, b) - const FTSENT * const *a, * const *b; +dsort(const FTSENT * const *a, const FTSENT * const *b) { if (S_ISDIR((*a)->fts_statp->st_mode)) { if (!S_ISDIR((*b)->fts_statp->st_mode)) diff --git a/usr.sbin/mtree/misc.c b/usr.sbin/mtree/misc.c index 1e3ca073d869..d61ffc55a979 100644 --- a/usr.sbin/mtree/misc.c +++ b/usr.sbin/mtree/misc.c @@ -88,9 +88,7 @@ static KEY keylist[] = { int keycompare(const void *, const void *); u_int -parsekey(name, needvaluep) - char *name; - int *needvaluep; +parsekey(char *name, int *needvaluep) { KEY *k, tmp; @@ -106,15 +104,13 @@ parsekey(name, needvaluep) } int -keycompare(a, b) - const void *a, *b; +keycompare(const void *a, const void *b) { return (strcmp(((const KEY *)a)->name, ((const KEY *)b)->name)); } char * -flags_to_string(fflags) - u_long fflags; +flags_to_string(u_long fflags) { char *string; diff --git a/usr.sbin/mtree/mtree.c b/usr.sbin/mtree/mtree.c index 0bb40d97c72e..406da312534d 100644 --- a/usr.sbin/mtree/mtree.c +++ b/usr.sbin/mtree/mtree.c @@ -168,7 +168,7 @@ main(int argc, char *argv[]) } static void -usage() +usage(void) { (void)fprintf(stderr, "usage: mtree [-LPUcdeinqrux] [-f spec] [-K key] [-k key] [-p path] [-s seed]\n" diff --git a/usr.sbin/mtree/spec.c b/usr.sbin/mtree/spec.c index 69786ecd3c44..9e5f93c2dbd5 100644 --- a/usr.sbin/mtree/spec.c +++ b/usr.sbin/mtree/spec.c @@ -59,10 +59,10 @@ static void set(char *, NODE *); static void unset(char *, NODE *); NODE * -spec() +spec(void) { - register NODE *centry, *last; - register char *p; + NODE *centry, *last; + char *p; NODE ginfo, *root; int c_cur, c_next; char buf[2048]; @@ -170,11 +170,9 @@ noparent: errx(1, "line %d: no parent node", lineno); } static void -set(t, ip) - char *t; - NODE *ip; +set(char *t, NODE *ip) { - register int type; + int type; char *kw, *val = NULL; struct group *gr; struct passwd *pw; @@ -312,11 +310,9 @@ set(t, ip) } static void -unset(t, ip) - char *t; - register NODE *ip; +unset(char *t, NODE *ip) { - register char *p; + char *p; while ((p = strtok(t, "\n\t "))) ip->flags &= ~parsekey(p, NULL); diff --git a/usr.sbin/mtree/verify.c b/usr.sbin/mtree/verify.c index b151e595215b..40288395c39c 100644 --- a/usr.sbin/mtree/verify.c +++ b/usr.sbin/mtree/verify.c @@ -63,7 +63,7 @@ static void miss(NODE *, char *); static int vwalk(void); int -verify() +verify(void) { int rval; @@ -74,11 +74,11 @@ verify() } static int -vwalk() +vwalk(void) { - register FTS *t; - register FTSENT *p; - register NODE *ep, *level; + FTS *t; + FTSENT *p; + NODE *ep, *level; int specdepth, rval; char *argv[2]; char dot[] = "."; @@ -159,12 +159,10 @@ extra: } static void -miss(p, tail) - register NODE *p; - register char *tail; +miss(NODE *p, char *tail) { - register int create; - register char *tp; + int create; + char *tp; const char *type; for (; p; p = p->next) {