From 27b62657a94b21845fcea14320c285cb5b1a2800 Mon Sep 17 00:00:00 2001 From: tholo <> Date: Sun, 15 Sep 1996 09:31:53 +0000 Subject: Remove dead code Remove unused variables Silence some warnings lint(1) is your friend --- src/lib/libc/net/rcmdsh.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/lib/libc/net/rcmdsh.c') diff --git a/src/lib/libc/net/rcmdsh.c b/src/lib/libc/net/rcmdsh.c index fe49a5a21b..39338c2c74 100644 --- a/src/lib/libc/net/rcmdsh.c +++ b/src/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 @@ -19,17 +19,19 @@ static char *rcsid = "$OpenBSD: rcmdsh.c,v 1.2 1996/09/01 20:28:22 millert Exp $ #include #include #include +#include /* * 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 */ } -- cgit v1.2.3-55-g6feb