diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-09-15 09:32:02 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-09-15 09:32:02 +0000 |
commit | 5839b84db8fa4a49976868786c93b29df9c4d568 (patch) | |
tree | ef3d545e61baa18f319312ada4e97e2c799c24c6 /lib/libc/net/rcmdsh.c | |
parent | 1d3f47d20a2b64c481a047ce24f39564b3e74533 (diff) |
Remove dead code
Remove unused variables
Silence some warnings
lint(1) is your friend
Diffstat (limited to 'lib/libc/net/rcmdsh.c')
-rw-r--r-- | lib/libc/net/rcmdsh.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/libc/net/rcmdsh.c b/lib/libc/net/rcmdsh.c index fe49a5a21bb..39338c2c744 100644 --- a/lib/libc/net/rcmdsh.c +++ b/lib/libc/net/rcmdsh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcmdsh.c,v 1.2 1996/09/01 20:28:22 millert Exp $ */ +/* $OpenBSD: rcmdsh.c,v 1.3 1996/09/15 09:31:17 tholo Exp $ */ /* * This is an rcmd() replacement originally by @@ -6,7 +6,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.2 1996/09/01 20:28:22 millert Exp $"; +static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.3 1996/09/15 09:31:17 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -19,17 +19,19 @@ static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.2 1996/09/01 20:28:22 millert Exp $ #include <string.h> #include <pwd.h> #include <paths.h> +#include <unistd.h> /* * This is a replacement rcmd() function that uses the rsh(1) * program in place of a direct rcmd(3) function call so as to * avoid having to be root. Note that rport is ignored. */ +/* ARGSUSED */ int rcmdsh(ahost, rport, locuser, remuser, cmd, rshprog) char **ahost; - u_short rport; - char *locuser, *remuser, *cmd; + int rport; + const char *locuser, *remuser, *cmd; char *rshprog; { struct hostent *hp; @@ -109,12 +111,12 @@ rcmdsh(ahost, rport, locuser, remuser, cmd, rshprog) (void) fprintf(stderr, "rcmdsh: execlp %s failed: %s\n", rshprog, strerror(errno)); _exit(255); - } else if (cpid > 0) { + } else { /* Parent. close sp[1], return sp[0]. */ (void) close(sp[1]); /* Reap child. */ (void) wait(NULL); return(sp[0]); } - /*NOTREACHED*/ + /* NOTREACHED */ } |