Skip to content

Commit 473cf57

Browse files
committed
Fix old ANSI C functions in fts_compat.c
1 parent a4f4b8d commit 473cf57

1 file changed

Lines changed: 13 additions & 19 deletions

File tree

src/libnffile/fts_compat.c

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,17 @@
7676

7777
#define STAT stat
7878

79-
static FTSENT *fts_alloc(FTS *, const char *, size_t);
80-
static FTSENT *fts_build(FTS *, int);
81-
static void fts_lfree(FTSENT *);
82-
static void fts_load(FTS *, FTSENT *);
83-
static size_t fts_maxarglen(char *const *);
84-
static size_t fts_pow2(size_t);
85-
static int fts_palloc(FTS *, size_t);
86-
static void fts_padjust(FTS *, FTSENT *);
87-
static FTSENT *fts_sort(FTS *, FTSENT *, size_t);
88-
static u_short fts_stat(FTS *, FTSENT *, int);
89-
static int fts_safe_changedir(const FTS *, const FTSENT *, int, const char *);
79+
static FTSENT *fts_alloc(FTS *sp, const char *name, size_t namelen);
80+
static FTSENT *fts_build(FTS *sp, int type);
81+
static void fts_lfree(FTSENT *head);
82+
static void fts_load(FTS *sp, FTSENT *p);
83+
static size_t fts_maxarglen(char *const *argv);
84+
static size_t fts_pow2(size_t x);
85+
static int fts_palloc(FTS *sp, size_t size);
86+
static void fts_padjust(FTS *sp, FTSENT *head);
87+
static FTSENT *fts_sort(FTS *sp, FTSENT *head, size_t nitems);
88+
static u_short fts_stat(FTS *sp, FTSENT *p, int follow);
89+
static int fts_safe_changedir(const FTS *sp, const FTSENT *p, int fd, const char *path);
9090

9191
#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
9292

@@ -985,9 +985,7 @@ static void fts_padjust(FTS *sp, FTSENT *head) {
985985
}
986986
}
987987

988-
static size_t fts_maxarglen(argv)
989-
char *const *argv;
990-
{
988+
static size_t fts_maxarglen(char *const *argv) {
991989
size_t len, max;
992990

993991
for (max = 0; *argv; ++argv)
@@ -1000,11 +998,7 @@ char *const *argv;
1000998
* tricked by someone changing the world out from underneath us.
1001999
* Assumes p->fts_dev and p->fts_ino are filled in.
10021000
*/
1003-
static int fts_safe_changedir(sp, p, fd, path) const FTS *sp;
1004-
const FTSENT *p;
1005-
int fd;
1006-
const char *path;
1007-
{
1001+
static int fts_safe_changedir(const FTS *sp, const FTSENT *p, int fd, const char *path) {
10081002
int oldfd = fd, ret = -1;
10091003
struct STAT sb;
10101004

0 commit comments

Comments
 (0)