summaryrefslogtreecommitdiff
path: root/bin/rcp
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-12-14 12:18:28 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-12-14 12:18:28 +0000
commit28e461d672204f54b8eb68a590d36c23a32f9574 (patch)
tree3e3c51ee95dec9ad261710930b40e4426389cbb8 /bin/rcp
parentfb3035e3379d9258753316427b03a4d8d0676d07 (diff)
-Wall'ing.
Diffstat (limited to 'bin/rcp')
-rw-r--r--bin/rcp/rcp.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c
index 00f991c9458..c2383c34fa2 100644
--- a/bin/rcp/rcp.c
+++ b/bin/rcp/rcp.c
@@ -1,5 +1,5 @@
/* $NetBSD: rcp.c,v 1.9 1995/03/21 08:19:06 cgd Exp $ */
-/* $OpenBSD: rcp.c,v 1.6 1996/08/02 12:41:04 deraadt Exp $ */
+/* $OpenBSD: rcp.c,v 1.7 1996/12/14 12:18:13 mickey Exp $ */
/*
* Copyright (c) 1983, 1990, 1992, 1993
@@ -101,6 +101,10 @@ char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */
#ifdef KERBEROS
int kerberos __P((char **, char *, char *, char *));
void oldw __P((const char *, ...));
+/* XXX from ../../usr.bin/rlogin/krcmd.c */
+int krcmd __P((char **, u_short, char *, char *, int *, char *));
+int krcmd_mutual __P((char **, u_short, char *, char *, int *,
+ char *, CREDENTIALS *, Key_schedule));
#endif
int response __P((void));
void rsource __P((char *, struct stat *));
@@ -216,7 +220,7 @@ main(argc, argv)
(void)signal(SIGPIPE, lostconn);
- if (targ = colon(argv[argc - 1])) /* Dest is remote host. */
+ if ((targ = colon(argv[argc - 1]))) /* Dest is remote host. */
toremote(targ, argc, argv);
else {
tolocal(argc, argv); /* Dest is local host. */
@@ -238,7 +242,7 @@ toremote(targ, argc, argv)
if (*targ == 0)
targ = ".";
- if (thost = strchr(argv[argc - 1], '@')) {
+ if ((thost = strchr(argv[argc - 1], '@'))) {
/* user@host */
*thost++ = 0;
tuser = argv[argc - 1];
@@ -499,7 +503,7 @@ rsource(name, statp)
closedir(dirp);
return;
}
- while (dp = readdir(dirp)) {
+ while ((dp = readdir(dirp)) != NULL) {
if (dp->d_ino == 0)
continue;
if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
@@ -529,7 +533,7 @@ sink(argc, argv)
BUF *bp;
off_t i, j;
int amt, count, exists, first, mask, mode, ofd, omode;
- int setimes, size, targisdir, wrerrno;
+ int setimes, size, targisdir, wrerrno = 0;
char ch, *cp, *np, *targ, *why, *vect[1], buf[BUFSIZ];
#define atime tv[0]