From 3fa90cb437f65e1dbba53bde148827ec0631cd0e Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 6 Apr 1997 09:14:35 +0000 Subject: [PATCH] cleanup using -Wall --- libexec/rexecd/rexecd.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libexec/rexecd/rexecd.c b/libexec/rexecd/rexecd.c index 9df468ecca5..bc03ca594f5 100644 --- a/libexec/rexecd/rexecd.c +++ b/libexec/rexecd/rexecd.c @@ -39,7 +39,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)rexecd.c 5.12 (Berkeley) 2/25/91";*/ -static char rcsid[] = "$Id: rexecd.c,v 1.7 1997/02/06 12:49:56 deraadt Exp $"; +static char rcsid[] = "$Id: rexecd.c,v 1.8 1997/04/06 09:14:35 deraadt Exp $"; #endif /* not lint */ #include @@ -61,7 +61,7 @@ static char rcsid[] = "$Id: rexecd.c,v 1.7 1997/02/06 12:49:56 deraadt Exp $"; #include /*VARARGS1*/ -int error(); +void error __P(()); char username[20] = "USER="; char homedir[MAXPATHLEN] = "HOME="; @@ -74,6 +74,9 @@ char *remote; struct sockaddr_in asin = { AF_INET }; +void doit __P((int, struct sockaddr_in *)); +void getstr __P((char *buf, int cnt, char *err)); + /* * remote execute server: * username\0 @@ -82,6 +85,7 @@ struct sockaddr_in asin = { AF_INET }; * data */ /*ARGSUSED*/ +int main(argc, argv) int argc; char **argv; @@ -103,8 +107,10 @@ main(argc, argv) remote = strdup(hp ? hp->h_name : inet_ntoa(from.sin_addr)); doit(0, &from); + exit(0); } +void doit(f, fromp) int f; struct sockaddr_in *fromp; @@ -251,6 +257,7 @@ doit(f, fromp) } /*VARARGS1*/ +void error(fmt, a1, a2, a3) char *fmt; int a1, a2, a3; @@ -262,6 +269,7 @@ error(fmt, a1, a2, a3) (void) write(2, buf, strlen(buf)); } +void getstr(buf, cnt, err) char *buf; int cnt; -- 2.20.1