diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2000-12-03 11:32:26 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2000-12-03 11:32:26 +0000 |
commit | ce16361e1971391339a60ad4359a0272f772bfda (patch) | |
tree | ed2df9546542af1fc54c858e4120def7f1071a52 | |
parent | 9355b54319c2ab3d52b8e36dfaed4aa85cfc4482 (diff) | |
download | FreeBSD-src-ce16361e1971391339a60ad4359a0272f772bfda.zip FreeBSD-src-ce16361e1971391339a60ad4359a0272f772bfda.tar.gz |
Tidy up some prototypes:
make sure there is exactly one prototype for each function,
use K&R style definitions everywhere to match dominant style,
make flag_signal take an int to avoid problems if we have
ANSI prototypes and K&R definitions.
-rw-r--r-- | usr.sbin/inetd/builtins.c | 2 | ||||
-rw-r--r-- | usr.sbin/inetd/inetd.c | 12 | ||||
-rw-r--r-- | usr.sbin/inetd/inetd.h | 3 |
3 files changed, 10 insertions, 7 deletions
diff --git a/usr.sbin/inetd/builtins.c b/usr.sbin/inetd/builtins.c index 490f98d..330214b 100644 --- a/usr.sbin/inetd/builtins.c +++ b/usr.sbin/inetd/builtins.c @@ -58,8 +58,6 @@ extern struct servtab *servtab; char ring[128]; char *endring; -int check_loop __P((struct sockaddr *, struct servtab *sep)); -void inetd_setproctitle __P((char *, int)); struct biltin biltins[] = { /* Echo received data */ diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index fce3afb..fa95662 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -784,9 +784,11 @@ main(argc, argv, envp) */ void flag_signal(c) - char c; + int c; { - if (write(signalpipe[1], &c, 1) != 1) { + char ch = c; + + if (write(signalpipe[1], &ch, 1) != 1) { syslog(LOG_ERR, "write: %m"); _exit(EX_OSERR); } @@ -1350,7 +1352,8 @@ enter(cp) } void -enable(struct servtab *sep) +enable(sep) + struct servtab *sep; { if (debug) warnx( @@ -1379,7 +1382,8 @@ enable(struct servtab *sep) } void -disable(struct servtab *sep) +disable(sep) + struct servtab *sep; { if (debug) warnx( diff --git a/usr.sbin/inetd/inetd.h b/usr.sbin/inetd/inetd.h index fc1d31a..f8caf25 100644 --- a/usr.sbin/inetd/inetd.h +++ b/usr.sbin/inetd/inetd.h @@ -109,7 +109,7 @@ struct servtab { void chargen_dg __P((int, struct servtab *)); void chargen_stream __P((int, struct servtab *)); void close_sep __P((struct servtab *)); -void flag_signal __P((char)); +void flag_signal __P((int)); void flag_config __P((int)); void config __P((void)); void daytime_dg __P((int, struct servtab *)); @@ -147,6 +147,7 @@ char *skip __P((char **)); struct servtab *tcpmux __P((int)); int cpmip __P((struct servtab *, int)); void inetd_setproctitle __P((char *, int)); +int check_loop __P((struct sockaddr *, struct servtab *sep)); void unregisterrpc __P((register struct servtab *sep)); |