1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00

Use ANSI prototypes.

This commit is contained in:
Xin LI 2012-02-18 00:55:54 +00:00
parent 90de8d2a65
commit 3a12c0461b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=231891

View File

@ -226,9 +226,7 @@ mem1: free(sp);
} }
static void static void
fts_load(sp, p) fts_load(FTS *sp, FTSENT *p)
FTS *sp;
FTSENT *p;
{ {
size_t len; size_t len;
char *cp; char *cp;
@ -252,8 +250,7 @@ fts_load(sp, p)
} }
int int
fts_close(sp) fts_close(FTS *sp)
FTS *sp;
{ {
FTSENT *freep, *p; FTSENT *freep, *p;
int saved_errno; int saved_errno;
@ -307,8 +304,7 @@ fts_close(sp)
? p->fts_pathlen - 1 : p->fts_pathlen) ? p->fts_pathlen - 1 : p->fts_pathlen)
FTSENT * FTSENT *
fts_read(sp) fts_read(FTS *sp)
FTS *sp;
{ {
FTSENT *p, *tmp; FTSENT *p, *tmp;
int instr; int instr;
@ -501,10 +497,7 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent);
*/ */
/* ARGSUSED */ /* ARGSUSED */
int int
fts_set(sp, p, instr) fts_set(FTS *sp, FTSENT *p, int instr)
FTS *sp;
FTSENT *p;
int instr;
{ {
if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW && if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
instr != FTS_NOINSTR && instr != FTS_SKIP) { instr != FTS_NOINSTR && instr != FTS_SKIP) {
@ -516,9 +509,7 @@ fts_set(sp, p, instr)
} }
FTSENT * FTSENT *
fts_children(sp, instr) fts_children(FTS *sp, int instr)
FTS *sp;
int instr;
{ {
FTSENT *p; FTSENT *p;
int fd; int fd;
@ -628,9 +619,7 @@ fts_set_clientptr(FTS *sp, void *clientptr)
* been found, cutting the stat calls by about 2/3. * been found, cutting the stat calls by about 2/3.
*/ */
static FTSENT * static FTSENT *
fts_build(sp, type) fts_build(FTS *sp, int type)
FTS *sp;
int type;
{ {
struct dirent *dp; struct dirent *dp;
FTSENT *p, *head; FTSENT *p, *head;
@ -876,10 +865,7 @@ mem1: saved_errno = errno;
} }
static int static int
fts_stat(sp, p, follow) fts_stat(FTS *sp, FTSENT *p, int follow)
FTS *sp;
FTSENT *p;
int follow;
{ {
FTSENT *t; FTSENT *t;
dev_t dev; dev_t dev;
@ -974,10 +960,7 @@ fts_compar(const void *a, const void *b)
} }
static FTSENT * static FTSENT *
fts_sort(sp, head, nitems) fts_sort(FTS *sp, FTSENT *head, size_t nitems)
FTS *sp;
FTSENT *head;
size_t nitems;
{ {
FTSENT **ap, *p; FTSENT **ap, *p;
@ -1006,10 +989,7 @@ fts_sort(sp, head, nitems)
} }
static FTSENT * static FTSENT *
fts_alloc(sp, name, namelen) fts_alloc(FTS *sp, char *name, size_t namelen)
FTS *sp;
char *name;
size_t namelen;
{ {
FTSENT *p; FTSENT *p;
size_t len; size_t len;
@ -1056,8 +1036,7 @@ fts_alloc(sp, name, namelen)
} }
static void static void
fts_lfree(head) fts_lfree(FTSENT *head)
FTSENT *head;
{ {
FTSENT *p; FTSENT *p;
@ -1075,9 +1054,7 @@ fts_lfree(head)
* plus 256 bytes so don't realloc the path 2 bytes at a time. * plus 256 bytes so don't realloc the path 2 bytes at a time.
*/ */
static int static int
fts_palloc(sp, more) fts_palloc(FTS *sp, size_t more)
FTS *sp;
size_t more;
{ {
sp->fts_pathlen += more + 256; sp->fts_pathlen += more + 256;
@ -1090,9 +1067,7 @@ fts_palloc(sp, more)
* already returned. * already returned.
*/ */
static void static void
fts_padjust(sp, head) fts_padjust(FTS *sp, FTSENT *head)
FTS *sp;
FTSENT *head;
{ {
FTSENT *p; FTSENT *p;
char *addr = sp->fts_path; char *addr = sp->fts_path;
@ -1133,11 +1108,7 @@ fts_maxarglen(argv)
* Assumes p->fts_dev and p->fts_ino are filled in. * Assumes p->fts_dev and p->fts_ino are filled in.
*/ */
static int static int
fts_safe_changedir(sp, p, fd, path) fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path)
FTS *sp;
FTSENT *p;
int fd;
char *path;
{ {
int ret, oerrno, newfd; int ret, oerrno, newfd;
struct stat sb; struct stat sb;