diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-06 09:14:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-06 09:14:36 +0000 |
commit | 9f09cc7a50a0c595c2f5b8f8df7cd1243998c48d (patch) | |
tree | 6898a0e6ece17a78db02d4b0fe52f38fb4d673b8 /libexec/rexecd/rexecd.c | |
parent | 061d052bb7692db5e54767b18fdccada0ec911b9 (diff) |
cleanup using -Wall
Diffstat (limited to 'libexec/rexecd/rexecd.c')
-rw-r--r-- | libexec/rexecd/rexecd.c | 12 |
1 files 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 <sys/param.h> @@ -61,7 +61,7 @@ static char rcsid[] = "$Id: rexecd.c,v 1.7 1997/02/06 12:49:56 deraadt Exp $"; #include <arpa/inet.h> /*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; |