diff options
author | Juli Mallett <jmallett@FreeBSD.org> | 2002-06-21 11:18:42 +0000 |
---|---|---|
committer | Juli Mallett <jmallett@FreeBSD.org> | 2002-06-21 11:18:42 +0000 |
commit | 081713dc5ba8b0bc1463d72abc83086889c6201f (patch) | |
tree | 915e0a4ae8ebfe232a33edaa99f8e7d58c8e52e8 /usr.sbin/inetd/inetd.c | |
parent | 4c2fb88368a53989ef25a4849842f8b01f654c1a (diff) | |
download | src-081713dc5ba8b0bc1463d72abc83086889c6201f.tar.gz src-081713dc5ba8b0bc1463d72abc83086889c6201f.zip |
ANSI prototypes via protoize(1).
Notes
Notes:
svn path=/head/; revision=98558
Diffstat (limited to 'usr.sbin/inetd/inetd.c')
-rw-r--r-- | usr.sbin/inetd/inetd.c | 84 |
1 files changed, 28 insertions, 56 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index ee6e8b6bc595..ec6e78d40129 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -268,9 +268,7 @@ const char *CONFIG = _PATH_INETDCONF; const char *pid_file = _PATH_INETDPID; int -getvalue(arg, value, whine) - const char *arg, *whine; - int *value; +getvalue(const char *arg, int *value, const char *whine) { int tmp; char *p; @@ -285,9 +283,7 @@ getvalue(arg, value, whine) } int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char **argv) { struct servtab *sep; struct passwd *pwd; @@ -807,8 +803,7 @@ main(argc, argv) */ void -flag_signal(c) - int c; +flag_signal(int c) { char ch = c; @@ -845,14 +840,13 @@ addchild(struct servtab *sep, pid_t pid) */ void -flag_reapchild(signo) - int signo __unused; +flag_reapchild(int signo) { flag_signal('C'); } void -reapchild() +reapchild(void) { int k, status; pid_t pid; @@ -883,14 +877,13 @@ reapchild() } void -flag_config(signo) - int signo __unused; +flag_config(int signo) { flag_signal('H'); } void -config() +config(void) { struct servtab *sep, *new, **sepp; long omask; @@ -1084,8 +1077,7 @@ config() } void -unregisterrpc(sep) - struct servtab *sep; +unregisterrpc(struct servtab *sep) { u_int i; struct servtab *sepp; @@ -1112,14 +1104,13 @@ unregisterrpc(sep) } void -flag_retry(signo) - int signo __unused; +flag_retry(int signo) { flag_signal('A'); } void -retry() +retry(void) { struct servtab *sep; @@ -1130,8 +1121,7 @@ retry() } void -setup(sep) - struct servtab *sep; +setup(struct servtab *sep) { int on = 1; @@ -1330,8 +1320,7 @@ ipsecsetup(sep) * Finish with a service and its socket. */ void -close_sep(sep) - struct servtab *sep; +close_sep(struct servtab *sep) { if (sep->se_fd >= 0) { if (FD_ISSET(sep->se_fd, &allsock)) @@ -1344,8 +1333,7 @@ close_sep(sep) } int -matchservent(name1, name2, proto) - const char *name1, *name2, *proto; +matchservent(const char *name1, const char *name2, const char *proto) { char **alias, *p; struct servent *se; @@ -1369,8 +1357,7 @@ matchservent(name1, name2, proto) } struct servtab * -enter(cp) - struct servtab *cp; +enter(struct servtab *cp) { struct servtab *sep; long omask; @@ -1390,8 +1377,7 @@ enter(cp) } void -enable(sep) - struct servtab *sep; +enable(struct servtab *sep) { if (debug) warnx( @@ -1420,8 +1406,7 @@ enable(sep) } void -disable(sep) - struct servtab *sep; +disable(struct servtab *sep) { if (debug) warnx( @@ -1458,7 +1443,7 @@ struct servtab serv; char line[LINE_MAX]; int -setconfig() +setconfig(void) { if (fconfig != NULL) { @@ -1470,7 +1455,7 @@ setconfig() } void -endconfig() +endconfig(void) { if (fconfig) { (void) fclose(fconfig); @@ -1479,7 +1464,7 @@ endconfig() } struct servtab * -getconfigent() +getconfigent(void) { struct servtab *sep = &serv; int argc; @@ -1847,8 +1832,7 @@ more: } void -freeconfig(cp) - struct servtab *cp; +freeconfig(struct servtab *cp) { int i; @@ -1883,8 +1867,7 @@ freeconfig(cp) * configuration file and exit. */ char * -sskip(cpp) - char **cpp; +sskip(char **cpp) { char *cp; @@ -1897,8 +1880,7 @@ sskip(cpp) } char * -skip(cpp) - char **cpp; +skip(char **cpp) { char *cp = *cpp; char *start; @@ -1934,8 +1916,7 @@ again: } char * -nextline(fd) - FILE *fd; +nextline(FILE *fd) { char *cp; @@ -1948,8 +1929,7 @@ nextline(fd) } char * -newstr(cp) - const char *cp; +newstr(const char *cp) { char *cr; @@ -1960,9 +1940,7 @@ newstr(cp) } void -inetd_setproctitle(a, s) - const char *a; - int s; +inetd_setproctitle(const char *a, int s) { socklen_t size; struct sockaddr_storage ss; @@ -1979,9 +1957,7 @@ inetd_setproctitle(a, s) } int -check_loop(sa, sep) - const struct sockaddr *sa; - const struct servtab *sep; +check_loop(const struct sockaddr *sa, const struct servtab *sep) { struct servtab *se2; char pname[INET6_ADDRSTRLEN]; @@ -2023,9 +1999,7 @@ check_loop(sa, sep) * Dump relevant information to stderr */ void -print_service(action, sep) - const char *action; - const struct servtab *sep; +print_service(const char *action, const struct servtab *sep) { fprintf(stderr, "%s: %s proto=%s accept=%d max=%d user=%s group=%s" @@ -2075,9 +2049,7 @@ typedef struct CHash { CHash CHashAry[CPMHSIZE]; int -cpmip(sep, ctrl) - const struct servtab *sep; - int ctrl; +cpmip(const struct servtab *sep, int ctrl) { struct sockaddr_storage rss; socklen_t rssLen = sizeof(rss); |