diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-06-30 23:54:09 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-06-30 23:54:09 +0000 |
commit | 3ac414237561174ba770356efa635381e6bf20f9 (patch) | |
tree | 551b97e7863a52b2ce3614dcc03eaf6bba4e447e /usr.bin/find/function.c | |
parent | d49b455c2791bed0d23046f0350db58b906ff660 (diff) |
Some -Wall cleanliness.
Diffstat (limited to 'usr.bin/find/function.c')
-rw-r--r-- | usr.bin/find/function.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c index d1089935ba9..9f8bccd957c 100644 --- a/usr.bin/find/function.c +++ b/usr.bin/find/function.c @@ -1,4 +1,4 @@ -/* $OpenBSD: function.c,v 1.8 1996/12/23 04:58:10 millert Exp $ */ +/* $OpenBSD: function.c,v 1.9 1997/06/30 23:54:07 millert Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -38,7 +38,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)function.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$OpenBSD: function.c,v 1.8 1996/12/23 04:58:10 millert Exp $"; +static char rcsid[] = "$OpenBSD: function.c,v 1.9 1997/06/30 23:54:07 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -77,6 +77,10 @@ static char rcsid[] = "$OpenBSD: function.c,v 1.8 1996/12/23 04:58:10 millert Ex static PLAN *palloc __P((enum ntype, int (*) __P((PLAN *, FTSENT *)))); +extern int dotfd; +extern time_t now; +extern FTS *tree; + /* * find_parsenum -- * Parse a string of the form [+-]# and return the value. @@ -141,7 +145,6 @@ f_atime(plan, entry) PLAN *plan; FTSENT *entry; { - extern time_t now; COMPARE((now - entry->fts_statp->st_atime + SECSPERDAY - 1) / SECSPERDAY, plan->t_data); @@ -171,7 +174,6 @@ f_ctime(plan, entry) PLAN *plan; FTSENT *entry; { - extern time_t now; COMPARE((now - entry->fts_statp->st_ctime + SECSPERDAY - 1) / SECSPERDAY, plan->t_data); @@ -273,7 +275,6 @@ f_exec(plan, entry) register PLAN *plan; FTSENT *entry; { - extern int dotfd; register int cnt; pid_t pid; int status; @@ -375,7 +376,6 @@ f_execdir(plan, entry) register PLAN *plan; FTSENT *entry; { - extern int dotfd; register int cnt; pid_t pid; int status; @@ -503,7 +503,7 @@ f_fstype(plan, entry) */ if (entry->fts_info == FTS_SL || entry->fts_info == FTS_SLNONE) { - if (p = strrchr(entry->fts_accpath, '/')) + if ((p = strrchr(entry->fts_accpath, '/'))) ++p; else p = entry->fts_accpath; @@ -697,7 +697,6 @@ f_maxdepth(plan, entry) PLAN *plan; FTSENT *entry; { - extern FTS *tree; if (entry->fts_level >= plan->max_data) fts_set(tree, entry, FTS_SKIP); @@ -726,7 +725,6 @@ f_mindepth(plan, entry) PLAN *plan; FTSENT *entry; { - extern FTS *tree; return (entry->fts_level >= plan->min_data); } @@ -753,7 +751,6 @@ f_mtime(plan, entry) PLAN *plan; FTSENT *entry; { - extern time_t now; COMPARE((now - entry->fts_statp->st_mtime + SECSPERDAY - 1) / SECSPERDAY, plan->t_data); @@ -964,6 +961,7 @@ f_print(plan, entry) } /* ARGSUSED */ +int f_print0(plan, entry) PLAN *plan; FTSENT *entry; @@ -999,7 +997,6 @@ f_prune(plan, entry) PLAN *plan; FTSENT *entry; { - extern FTS *tree; if (fts_set(tree, entry, FTS_SKIP)) err(1, "%s", entry->fts_path); @@ -1260,7 +1257,7 @@ palloc(t, f) { PLAN *new; - if (new = malloc(sizeof(PLAN))) { + if ((new = malloc(sizeof(PLAN)))) { new->type = t; new->eval = f; new->flags = 0; |