summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-01 05:42:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-01 05:42:21 +0000
commitc36fbfc783f2dac7d58db7663df22d3173161dd3 (patch)
treee6ecd6dcd0be4769186e4ea418e1b32cc981153a /usr.bin
parenta92141e37550824a9b7e553754b8ccbe22312756 (diff)
minimal lint cleanup (unused crud, and some size_t); ok djm
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/scp.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c
index 99e8d063401..8216352679f 100644
--- a/usr.bin/ssh/scp.c
+++ b/usr.bin/ssh/scp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.139 2006/03/25 13:17:02 djm Exp $ */
+/* $OpenBSD: scp.c,v 1.140 2006/04/01 05:42:20 deraadt Exp $ */
/*
* scp - secure remote copy. This is basically patched BSD rcp which
* uses ssh to do the data transfer (instead of using rcmd).
@@ -88,7 +88,7 @@
#include "misc.h"
#include "progressmeter.h"
-int do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc);
+int do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout);
void bwlimit(int);
@@ -175,7 +175,7 @@ do_local_cmd(arglist *a)
*/
int
-do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc)
+do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout)
{
int pin[2], pout[2], reserved[2];
@@ -242,7 +242,6 @@ typedef struct {
BUF *allocbuf(BUF *, int, int);
void lostconn(int);
-void nospace(void);
int okname(char *);
void run_err(const char *,...);
void verifydir(char *);
@@ -412,9 +411,10 @@ main(int argc, char **argv)
void
toremote(char *targ, int argc, char **argv)
{
- int i, len;
char *bp, *host, *src, *suser, *thost, *tuser, *arg;
arglist alist;
+ size_t len;
+ int i;
memset(&alist, '\0', sizeof(alist));
alist.list = NULL;
@@ -484,7 +484,7 @@ toremote(char *targ, int argc, char **argv)
(void) snprintf(bp, len, "%s -t %s", cmd, targ);
host = cleanhostname(thost);
if (do_cmd(host, tuser, bp, &remin,
- &remout, argc) < 0)
+ &remout) < 0)
exit(1);
if (response() < 0)
exit(1);
@@ -498,9 +498,10 @@ toremote(char *targ, int argc, char **argv)
void
tolocal(int argc, char **argv)
{
- int i, len;
char *bp, *host, *src, *suser;
arglist alist;
+ size_t len;
+ int i;
memset(&alist, '\0', sizeof(alist));
alist.list = NULL;
@@ -535,7 +536,7 @@ tolocal(int argc, char **argv)
len = strlen(src) + CMDNEEDS + 20;
bp = xmalloc(len);
(void) snprintf(bp, len, "%s -f %s", cmd, src);
- if (do_cmd(host, suser, bp, &remin, &remout, argc) < 0) {
+ if (do_cmd(host, suser, bp, &remin, &remout) < 0) {
(void) xfree(bp);
++errs;
continue;
@@ -780,7 +781,8 @@ sink(int argc, char **argv)
BUF *bp;
off_t i;
size_t j, count;
- int amt, exists, first, mask, mode, ofd, omode;
+ int amt, exists, first, ofd;
+ mode_t mode, omode, mask;
off_t size, statbytes;
int setimes, targisdir, wrerrno = 0;
char ch, *cp, *np, *targ, *why, *vect[1], buf[2048];