diff options
author | Roland McGrath <roland@gnu.org> | 1996-01-24 03:02:14 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-01-24 03:02:14 +0000 |
commit | 8ebd0a71be7bb15b5abdcf1b9d218923a9e2eec5 (patch) | |
tree | e4d696a3a9ddace08e4d718219afc55d511e5438 | |
parent | 6d5cbf7b35bdbfe5bc9675842b2cf595f12288cc (diff) | |
download | glibc-8ebd0a71be7bb15b5abdcf1b9d218923a9e2eec5.tar glibc-8ebd0a71be7bb15b5abdcf1b9d218923a9e2eec5.tar.gz glibc-8ebd0a71be7bb15b5abdcf1b9d218923a9e2eec5.tar.bz2 glibc-8ebd0a71be7bb15b5abdcf1b9d218923a9e2eec5.zip |
(fts_open): Use prototypes for COMPAR decl.
-rw-r--r-- | io/fts.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -90,7 +90,7 @@ FTS * fts_open(argv, options, compar) char * const *argv; register int options; - int (*compar)(); + int (*compar) __P((const FTSENT **, const FTSENT **)); { register FTS *sp; register FTSENT *p, *root; @@ -108,7 +108,7 @@ fts_open(argv, options, compar) if ((sp = malloc((u_int)sizeof(FTS))) == NULL) return (NULL); bzero(sp, sizeof(FTS)); - sp->fts_compar = compar; + sp->fts_compar = (int (*) __P((const void *, const void *))) compar; sp->fts_options = options; /* Logical walks turn on NOCHDIR; symbolic links are too hard. */ @@ -333,7 +333,7 @@ fts_read(sp) } p->fts_info = FTS_DP; return (p); - } + } /* Rebuild if only read the names and now traversing. */ if (sp->fts_child && sp->fts_options & FTS_NAMEONLY) { @@ -528,7 +528,7 @@ fts_children(sp, instr) if (instr == FTS_NAMEONLY) { sp->fts_options |= FTS_NAMEONLY; instr = BNAMES; - } else + } else instr = BCHILD; /* @@ -700,7 +700,7 @@ mem1: saved_errno = errno; p->fts_accpath = cur->fts_accpath; } else if (nlinks == 0 #ifdef DT_DIR - || nlinks > 0 && + || nlinks > 0 && dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN #endif ) { @@ -790,7 +790,7 @@ fts_stat(sp, p, follow) /* If user needs stat info, stat buffer already allocated. */ sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp; - + /* * If doing a logical walk, or application requested FTS_FOLLOW, do * a stat(2). If that fails, check for a non-existent symlink. If @@ -802,7 +802,7 @@ fts_stat(sp, p, follow) if (!lstat(p->fts_accpath, sbp)) { errno = 0; return (FTS_SLNONE); - } + } p->fts_errno = saved_errno; goto err; } @@ -935,7 +935,7 @@ fts_lfree(head) * Allow essentially unlimited paths; find, rm, ls should all work on any tree. * Most systems will allow creation of paths much longer than MAXPATHLEN, even * though the kernel won't resolve them. Add the size (not just what's needed) - * 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 fts_palloc(sp, more) |