summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-04-23 12:04:27 +1000
committerDamien Miller <djm@mindrot.org>2006-04-23 12:04:27 +1000
commit07aa132a5e32f5c08694afabf5ebb14fb7c66006 (patch)
tree8a6ab433a4034cf6933e46fc90b3a119eb724f9b
parent73b42d2bb058da914828b53f2951954560a5b6eb (diff)
- (djm) OpenBSD CVS Sync
- deraadt@cvs.openbsd.org 2006/04/01 05:42:20 [scp.c] minimal lint cleanup (unused crud, and some size_t); ok djm
-rw-r--r--ChangeLog8
-rw-r--r--scp.c20
2 files changed, 19 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 92a2f25d..fb737717 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+20060423
+ - (djm) OpenBSD CVS Sync
+ - deraadt@cvs.openbsd.org 2006/04/01 05:42:20
+ [scp.c]
+ minimal lint cleanup (unused crud, and some size_t); ok djm
+
20060421
- (djm) [Makefile.in configure.ac session.c sshpty.c]
[contrib/redhat/sshd.init openbsd-compat/Makefile.in]
@@ -4508,4 +4514,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.4302 2006/04/22 11:26:08 djm Exp $
+$Id: ChangeLog,v 1.4303 2006/04/23 02:04:27 djm Exp $
diff --git a/scp.c b/scp.c
index 2f89aa49..6c8bbcdb 100644
--- a/scp.c
+++ b/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).
@@ -92,6 +92,8 @@
extern char *__progname;
+int do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout);
+
void bwlimit(int);
/* Struct for addargs */
@@ -177,7 +179,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];
@@ -244,7 +246,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 *);
@@ -419,9 +420,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;
@@ -491,7 +493,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);
@@ -505,9 +507,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;
@@ -542,7 +545,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;
@@ -787,7 +790,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];