diff options
Diffstat (limited to 'lib/libc/gen')
32 files changed, 56 insertions, 142 deletions
diff --git a/lib/libc/gen/alarm.c b/lib/libc/gen/alarm.c index 318be4c..439a9e1 100644 --- a/lib/libc/gen/alarm.c +++ b/lib/libc/gen/alarm.c @@ -40,8 +40,7 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> unsigned int -alarm(secs) - unsigned int secs; +alarm(unsigned int secs) { struct itimerval it, oitv; struct itimerval *itp = ⁢ diff --git a/lib/libc/gen/assert.c b/lib/libc/gen/assert.c index 73e199c..ccbc7a4 100644 --- a/lib/libc/gen/assert.c +++ b/lib/libc/gen/assert.c @@ -38,10 +38,7 @@ __FBSDID("$FreeBSD$"); #include <stdlib.h> void -__assert(func, file, line, failedexpr) - const char *func, *file; - int line; - const char *failedexpr; +__assert(const char *func, const char *file, int line, const char *failedexpr) { if (func == NULL) (void)fprintf(stderr, diff --git a/lib/libc/gen/err.c b/lib/libc/gen/err.c index 0ba584c..a536e5a 100644 --- a/lib/libc/gen/err.c +++ b/lib/libc/gen/err.c @@ -79,10 +79,7 @@ _err(int eval, const char *fmt, ...) } void -verr(eval, fmt, ap) - int eval; - const char *fmt; - va_list ap; +verr(int eval, const char *fmt, va_list ap) { verrc(eval, errno, fmt, ap); } diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c index 4998ee8..c6731f7 100644 --- a/lib/libc/gen/exec.c +++ b/lib/libc/gen/exec.c @@ -131,9 +131,7 @@ execlp(const char *name, const char *arg, ...) } int -execv(name, argv) - const char *name; - char * const *argv; +execv(const char *name, char * const *argv) { (void)_execve(name, argv, environ); return (-1); diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c index 47d0a41..173592a 100644 --- a/lib/libc/gen/fnmatch.c +++ b/lib/libc/gen/fnmatch.c @@ -76,9 +76,7 @@ static int fnmatch1(const char *, const char *, const char *, int, mbstate_t, mbstate_t); int -fnmatch(pattern, string, flags) - const char *pattern, *string; - int flags; +fnmatch(const char *pattern, const char *string, int flags) { static const mbstate_t initial; @@ -86,10 +84,8 @@ fnmatch(pattern, string, flags) } static int -fnmatch1(pattern, string, stringstart, flags, patmbs, strmbs) - const char *pattern, *string, *stringstart; - int flags; - mbstate_t patmbs, strmbs; +fnmatch1(const char *pattern, const char *string, const char *stringstart, + int flags, mbstate_t patmbs, mbstate_t strmbs) { char *newp; char c; @@ -214,12 +210,8 @@ fnmatch1(pattern, string, stringstart, flags, patmbs, strmbs) } static int -rangematch(pattern, test, flags, newp, patmbs) - const char *pattern; - wchar_t test; - int flags; - char **newp; - mbstate_t *patmbs; +rangematch(const char *pattern, wchar_t test, int flags, char **newp, + mbstate_t *patmbs) { int negate, ok; wchar_t c, c2; diff --git a/lib/libc/gen/ftok.c b/lib/libc/gen/ftok.c index 4269e37..2fad66e 100644 --- a/lib/libc/gen/ftok.c +++ b/lib/libc/gen/ftok.c @@ -33,9 +33,7 @@ __FBSDID("$FreeBSD$"); #include <sys/ipc.h> key_t -ftok(path, id) - const char *path; - int id; +ftok(const char *path, int id) { struct stat st; diff --git a/lib/libc/gen/fts-compat.c b/lib/libc/gen/fts-compat.c index 105b064..313431a 100644 --- a/lib/libc/gen/fts-compat.c +++ b/lib/libc/gen/fts-compat.c @@ -120,10 +120,8 @@ static const char *ufslike_filesystems[] = { }; FTS * -__fts_open_44bsd(argv, options, compar) - char * const *argv; - int options; - int (*compar)(const FTSENT * const *, const FTSENT * const *); +__fts_open_44bsd(char * const *argv, int options, + int (*compar)(const FTSENT * const *, const FTSENT * const *)) { struct _fts_private *priv; FTS *sp; @@ -234,9 +232,7 @@ mem1: free(sp); } static void -fts_load(sp, p) - FTS *sp; - FTSENT *p; +fts_load(FTS *sp, FTSENT *p) { int len; char *cp; @@ -260,8 +256,7 @@ fts_load(sp, p) } int -__fts_close_44bsd(sp) - FTS *sp; +__fts_close_44bsd(FTS *sp) { FTSENT *freep, *p; int saved_errno; @@ -315,8 +310,7 @@ __fts_close_44bsd(sp) ? p->fts_pathlen - 1 : p->fts_pathlen) FTSENT * -__fts_read_44bsd(sp) - FTS *sp; +__fts_read_44bsd(FTS *sp) { FTSENT *p, *tmp; int instr; @@ -510,10 +504,7 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent); */ /* ARGSUSED */ int -__fts_set_44bsd(sp, p, instr) - FTS *sp; - FTSENT *p; - int instr; +__fts_set_44bsd(FTS *sp, FTSENT *p, int instr) { if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW && instr != FTS_NOINSTR && instr != FTS_SKIP) { @@ -525,9 +516,7 @@ __fts_set_44bsd(sp, p, instr) } FTSENT * -__fts_children_44bsd(sp, instr) - FTS *sp; - int instr; +__fts_children_44bsd(FTS *sp, int instr) { FTSENT *p; int fd; diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index 8083a88..03ef5c8 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -110,10 +110,8 @@ static const char *ufslike_filesystems[] = { }; FTS * -fts_open(argv, options, compar) - char * const *argv; - int options; - int (*compar)(const FTSENT * const *, const FTSENT * const *); +fts_open(char * const *argv, int options, + int (*compar)(const FTSENT * const *, const FTSENT * const *)) { struct _fts_private *priv; FTS *sp; @@ -1105,8 +1103,7 @@ fts_padjust(FTS *sp, FTSENT *head) } static size_t -fts_maxarglen(argv) - char * const *argv; +fts_maxarglen(char * const *argv) { size_t len, max; diff --git a/lib/libc/gen/getbsize.c b/lib/libc/gen/getbsize.c index 7e88e3f..bbf5b1e 100644 --- a/lib/libc/gen/getbsize.c +++ b/lib/libc/gen/getbsize.c @@ -39,9 +39,7 @@ __FBSDID("$FreeBSD$"); #include <string.h> char * -getbsize(headerlenp, blocksizep) - int *headerlenp; - long *blocksizep; +getbsize(int *headerlenp, long *blocksizep) { static char header[20]; long n, max, mul, blocksize; diff --git a/lib/libc/gen/getcwd.c b/lib/libc/gen/getcwd.c index da76d56..6884897 100644 --- a/lib/libc/gen/getcwd.c +++ b/lib/libc/gen/getcwd.c @@ -55,9 +55,7 @@ __FBSDID("$FreeBSD$"); extern int __getcwd(char *, size_t); char * -getcwd(pt, size) - char *pt; - size_t size; +getcwd(char *pt, size_t size) { struct dirent *dp; DIR *dir = NULL; diff --git a/lib/libc/gen/getdomainname.c b/lib/libc/gen/getdomainname.c index 21eb66d..5a38857 100644 --- a/lib/libc/gen/getdomainname.c +++ b/lib/libc/gen/getdomainname.c @@ -39,9 +39,7 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> int -getdomainname(name, namelen) - char *name; - int namelen; +getdomainname(char *name, int namelen) { int mib[2]; size_t size; diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index dc9cabd..31d2af1 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -75,8 +75,7 @@ static const ns_src defaultsrc[] = { { NULL, 0 } }; -int __getgroupmembership(const char *uname, gid_t agroup, gid_t *groups, - int maxgrp, int *grpcnt); +int __getgroupmembership(const char *, gid_t, gid_t *, int, int *); int __gr_match_entry(const char *, size_t, enum nss_lookup_type, const char *, gid_t); int __gr_parse_entry(char *, size_t, struct group *, char *, size_t, diff --git a/lib/libc/gen/gethostname.c b/lib/libc/gen/gethostname.c index c83805e..dc2b372 100644 --- a/lib/libc/gen/gethostname.c +++ b/lib/libc/gen/gethostname.c @@ -40,9 +40,7 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> int -gethostname(name, namelen) - char *name; - size_t namelen; +gethostname(char *name, size_t namelen) { int mib[2]; diff --git a/lib/libc/gen/getpagesize.c b/lib/libc/gen/getpagesize.c index f4b8128..da2eb69 100644 --- a/lib/libc/gen/getpagesize.c +++ b/lib/libc/gen/getpagesize.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); */ int -getpagesize() +getpagesize(void) { int mib[2]; static int value; diff --git a/lib/libc/gen/getusershell.c b/lib/libc/gen/getusershell.c index 53536e1..6e78286 100644 --- a/lib/libc/gen/getusershell.c +++ b/lib/libc/gen/getusershell.c @@ -102,10 +102,7 @@ static int _local_initshells(void *, void *, va_list); /*ARGSUSED*/ static int -_local_initshells(rv, cb_data, ap) - void *rv; - void *cb_data; - va_list ap; +_local_initshells(void *rv, void *cb_data, va_list ap) { char *sp, *cp; FILE *fp; @@ -139,10 +136,7 @@ static int _dns_initshells(void *, void *, va_list); /*ARGSUSED*/ static int -_dns_initshells(rv, cb_data, ap) - void *rv; - void *cb_data; - va_list ap; +_dns_initshells(void *rv, void *cb_data, va_list ap) { char shellname[] = "shells-XXXXX"; int hsindex, hpi, r; @@ -183,10 +177,7 @@ static int _nis_initshells(void *, void *, va_list); /*ARGSUSED*/ static int -_nis_initshells(rv, cb_data, ap) - void *rv; - void *cb_data; - va_list ap; +_nis_initshells(void *rv, void *cb_data, va_list ap) { static char *ypdomain; char *key, *data; @@ -239,7 +230,7 @@ _nis_initshells(rv, cb_data, ap) #endif /* YP */ static const char *const * -initshells() +initshells(void) { static const ns_dtab dtab[] = { NS_FILES_CB(_local_initshells, NULL) diff --git a/lib/libc/gen/getvfsbyname.c b/lib/libc/gen/getvfsbyname.c index 0d896bb..c90c5ee 100644 --- a/lib/libc/gen/getvfsbyname.c +++ b/lib/libc/gen/getvfsbyname.c @@ -45,9 +45,7 @@ __FBSDID("$FreeBSD$"); * and if it is resident, return its xvfsconf structure. */ int -getvfsbyname(fsname, vfcp) - const char *fsname; - struct xvfsconf *vfcp; +getvfsbyname(const char *fsname, struct xvfsconf *vfcp) { struct xvfsconf *xvfsp; size_t buflen; diff --git a/lib/libc/gen/initgroups.c b/lib/libc/gen/initgroups.c index aacaf7e..d6a644c 100644 --- a/lib/libc/gen/initgroups.c +++ b/lib/libc/gen/initgroups.c @@ -44,9 +44,7 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> int -initgroups(uname, agroup) - const char *uname; - gid_t agroup; +initgroups(const char *uname, gid_t agroup) { int ngroups, ret; long ngroups_max; diff --git a/lib/libc/gen/isatty.c b/lib/libc/gen/isatty.c index 076b824..02b0ffd 100644 --- a/lib/libc/gen/isatty.c +++ b/lib/libc/gen/isatty.c @@ -37,8 +37,7 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> int -isatty(fd) - int fd; +isatty(int fd) { int retval; struct termios t; diff --git a/lib/libc/gen/popen.c b/lib/libc/gen/popen.c index e54bb5c..a7a9708 100644 --- a/lib/libc/gen/popen.c +++ b/lib/libc/gen/popen.c @@ -67,8 +67,7 @@ static pthread_mutex_t pidlist_mutex = PTHREAD_MUTEX_INITIALIZER; #define THREAD_UNLOCK() if (__isthreaded) _pthread_mutex_unlock(&pidlist_mutex) FILE * -popen(command, type) - const char *command, *type; +popen(const char *command, const char *type) { struct pid *cur; FILE *iop; @@ -179,8 +178,7 @@ popen(command, type) * if already `pclosed', or waitpid returns an error. */ int -pclose(iop) - FILE *iop; +pclose(FILE *iop) { struct pid *cur, *last = NULL; int pstat; diff --git a/lib/libc/gen/psignal.c b/lib/libc/gen/psignal.c index 6fca4b1..5c5aada 100644 --- a/lib/libc/gen/psignal.c +++ b/lib/libc/gen/psignal.c @@ -44,9 +44,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" void -psignal(sig, s) - unsigned int sig; - const char *s; +psignal(unsigned int sig, const char *s) { const char *c; diff --git a/lib/libc/gen/raise.c b/lib/libc/gen/raise.c index 46dffb1..4bc895e 100644 --- a/lib/libc/gen/raise.c +++ b/lib/libc/gen/raise.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); __weak_reference(__raise, raise); __weak_reference(__raise, _raise); -int __raise(int s); +int __raise(int); int __raise(int s) diff --git a/lib/libc/gen/readdir.c b/lib/libc/gen/readdir.c index c6f5d3f..b5162ed 100644 --- a/lib/libc/gen/readdir.c +++ b/lib/libc/gen/readdir.c @@ -49,9 +49,7 @@ __FBSDID("$FreeBSD$"); * get next entry in a directory. */ struct dirent * -_readdir_unlocked(dirp, skip) - DIR *dirp; - int skip; +_readdir_unlocked(DIR *dirp, int skip) { struct dirent *dp; long initial_seek; @@ -91,8 +89,7 @@ _readdir_unlocked(dirp, skip) } struct dirent * -readdir(dirp) - DIR *dirp; +readdir(DIR *dirp) { struct dirent *dp; @@ -107,10 +104,7 @@ readdir(dirp) } int -readdir_r(dirp, entry, result) - DIR *dirp; - struct dirent *entry; - struct dirent **result; +readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) { struct dirent *dp; int saved_errno; diff --git a/lib/libc/gen/rewinddir.c b/lib/libc/gen/rewinddir.c index e157cd6..2421c47 100644 --- a/lib/libc/gen/rewinddir.c +++ b/lib/libc/gen/rewinddir.c @@ -45,8 +45,7 @@ __FBSDID("$FreeBSD$"); #include "telldir.h" void -rewinddir(dirp) - DIR *dirp; +rewinddir(DIR *dirp) { if (__isthreaded) diff --git a/lib/libc/gen/seekdir.c b/lib/libc/gen/seekdir.c index e9851a7..699de46 100644 --- a/lib/libc/gen/seekdir.c +++ b/lib/libc/gen/seekdir.c @@ -48,9 +48,7 @@ __FBSDID("$FreeBSD$"); * _seekdir is in telldir.c so that it can share opaque data structures. */ void -seekdir(dirp, loc) - DIR *dirp; - long loc; +seekdir(DIR *dirp, long loc) { if (__isthreaded) _pthread_mutex_lock(&dirp->dd_lock); diff --git a/lib/libc/gen/setjmperr.c b/lib/libc/gen/setjmperr.c index 3cfeb55..90fa4aa 100644 --- a/lib/libc/gen/setjmperr.c +++ b/lib/libc/gen/setjmperr.c @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" void -longjmperror() +longjmperror(void) { #define ERRMSG "longjmp botch.\n" (void)_write(STDERR_FILENO, ERRMSG, sizeof(ERRMSG) - 1); diff --git a/lib/libc/gen/sigsetops.c b/lib/libc/gen/sigsetops.c index cf7e688..cbcbfec 100644 --- a/lib/libc/gen/sigsetops.c +++ b/lib/libc/gen/sigsetops.c @@ -39,9 +39,7 @@ __FBSDID("$FreeBSD$"); #include <signal.h> int -sigaddset(set, signo) - sigset_t *set; - int signo; +sigaddset(sigset_t *set, int signo) { if (signo <= 0 || signo > _SIG_MAXSIG) { @@ -53,9 +51,7 @@ sigaddset(set, signo) } int -sigdelset(set, signo) - sigset_t *set; - int signo; +sigdelset(sigset_t *set, int signo) { if (signo <= 0 || signo > _SIG_MAXSIG) { @@ -67,8 +63,7 @@ sigdelset(set, signo) } int -sigemptyset(set) - sigset_t *set; +sigemptyset(sigset_t *set) { int i; @@ -78,8 +73,7 @@ sigemptyset(set) } int -sigfillset(set) - sigset_t *set; +sigfillset(sigset_t *set) { int i; @@ -89,9 +83,7 @@ sigfillset(set) } int -sigismember(set, signo) - const sigset_t *set; - int signo; +sigismember(const sigset_t *set, int signo) { if (signo <= 0 || signo > _SIG_MAXSIG) { diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index 2b3acfb..be3d4af 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -69,8 +69,7 @@ __FBSDID("$FreeBSD$"); * less useful than returning up-to-date values, however. */ long -sysconf(name) - int name; +sysconf(int name) { struct rlimit rl; size_t len; diff --git a/lib/libc/gen/telldir.c b/lib/libc/gen/telldir.c index 19cd6ee..3e5678c 100644 --- a/lib/libc/gen/telldir.c +++ b/lib/libc/gen/telldir.c @@ -50,8 +50,7 @@ __FBSDID("$FreeBSD$"); * return a pointer into a directory */ long -telldir(dirp) - DIR *dirp; +telldir(DIR *dirp) { struct ddloc *lp; long idx; @@ -86,9 +85,7 @@ telldir(dirp) * Only values returned by "telldir" should be passed to seekdir. */ void -_seekdir(dirp, loc) - DIR *dirp; - long loc; +_seekdir(DIR *dirp, long loc) { struct ddloc *lp; struct dirent *dp; @@ -152,8 +149,7 @@ _fixtelldir(DIR *dirp, long oldseek, long oldloc) * Reclaim memory for telldir cookies which weren't used. */ void -_reclaim_telldir(dirp) - DIR *dirp; +_reclaim_telldir(DIR *dirp) { struct ddloc *lp; struct ddloc *templp; diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c index 73eb9a2..ca4d696 100644 --- a/lib/libc/gen/tls.c +++ b/lib/libc/gen/tls.c @@ -270,7 +270,7 @@ __libc_free_tls(void *tcb __unused, size_t tcbsize __unused, extern char **environ; void -_init_tls() +_init_tls(void) { #ifndef PIC Elf_Addr *sp; diff --git a/lib/libc/gen/ualarm.c b/lib/libc/gen/ualarm.c index bf75775..6a1dca7 100644 --- a/lib/libc/gen/ualarm.c +++ b/lib/libc/gen/ualarm.c @@ -44,9 +44,7 @@ __FBSDID("$FreeBSD$"); * every ``reload'' microseconds after the first signal. */ useconds_t -ualarm(usecs, reload) - useconds_t usecs; - useconds_t reload; +ualarm(useconds_t usecs, useconds_t reload) { struct itimerval new, old; diff --git a/lib/libc/gen/unvis-compat.c b/lib/libc/gen/unvis-compat.c index e18fa72..5fa5ca9 100644 --- a/lib/libc/gen/unvis-compat.c +++ b/lib/libc/gen/unvis-compat.c @@ -34,7 +34,7 @@ #define _UNVIS_END 1 -int __unvis_44bsd(char *cp, int c, int *astate, int flag); +int __unvis_44bsd(char *, int, int *, int); int __unvis_44bsd(char *cp, int c, int *astate, int flag) diff --git a/lib/libc/gen/utime.c b/lib/libc/gen/utime.c index 97bf878..0250a7a 100644 --- a/lib/libc/gen/utime.c +++ b/lib/libc/gen/utime.c @@ -38,9 +38,7 @@ __FBSDID("$FreeBSD$"); #include <utime.h> int -utime(path, times) - const char *path; - const struct utimbuf *times; +utime(const char *path, const struct utimbuf *times) { struct timeval tv[2], *tvp; |