diff options
author | stefanf <stefanf@FreeBSD.org> | 2004-08-02 08:18:43 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2004-08-02 08:18:43 +0000 |
commit | 142f90039da021ea56511e077aa013ab56f064a1 (patch) | |
tree | 29abd26c5141a322eb7432f98dffff1276324b1f | |
parent | 2e9ff9c3df9ea70ff401c8e81f3a3ad7724b1bd7 (diff) | |
download | FreeBSD-src-142f90039da021ea56511e077aa013ab56f064a1.zip FreeBSD-src-142f90039da021ea56511e077aa013ab56f064a1.tar.gz |
Don't pass function pointers via a void * parameter.
-rw-r--r-- | lib/libc/gen/ftw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/gen/ftw.c b/lib/libc/gen/ftw.c index 142474e..30d1f9b 100644 --- a/lib/libc/gen/ftw.c +++ b/lib/libc/gen/ftw.c @@ -48,7 +48,7 @@ enum __ftw_modes { /* Prototype this so that we can have it later */ -static int __ftw_core(const char *, void *, int, int, enum __ftw_modes); +static int __ftw_core(const char *, void (*)(), int, int, enum __ftw_modes); /* * The external function calls are really just wrappers around __ftw_core, @@ -56,11 +56,11 @@ static int __ftw_core(const char *, void *, int, int, enum __ftw_modes); */ int ftw (const char *dir, __ftw_func_t func, int descr) { - return __ftw_core(dir, func, descr, 0, MODE_FTW); + return __ftw_core(dir, (void (*)())func, descr, 0, MODE_FTW); } int nftw (const char *dir, __nftw_func_t func, int descr, int flags) { - return __ftw_core(dir, func, descr, flags, MODE_NFTW); + return __ftw_core(dir, (void (*)())func, descr, flags, MODE_NFTW); } /* @@ -70,7 +70,7 @@ typedef int (*__nftw_func_t) \ (const char *file, const struct stat status, int flag, struct FTW detail); */ -static int __ftw_core(const char *dir, void *func, int descr, int flags, +static int __ftw_core(const char *dir, void (*func)(), int descr, int flags, enum __ftw_modes mode) { FTS *hierarchy; FTSENT *entry; |