summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2003-11-23 23:21:22 +0000
committerDamien Miller <djm@cvs.openbsd.org>2003-11-23 23:21:22 +0000
commit372478507c629d79485fa9215c7b9418664700f2 (patch)
tree3006eb65be4c6593dc49bdddd2d43944864ac396
parent5a9bab25a289dc416634afbb936c3eb2f63816d4 (diff)
from portable: rename clashing variable limit-> limit_rate; ok markus@
-rw-r--r--usr.bin/ssh/scp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c
index bf8f543b064..cb1da7d1f98 100644
--- a/usr.bin/ssh/scp.c
+++ b/usr.bin/ssh/scp.c
@@ -71,7 +71,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.112 2003/11/21 11:57:03 djm Exp $");
+RCSID("$OpenBSD: scp.c,v 1.113 2003/11/23 23:21:21 djm Exp $");
#include "xmalloc.h"
#include "atomicio.h"
@@ -88,7 +88,7 @@ void bwlimit(int);
arglist args;
/* Bandwidth limit */
-off_t limit = 0;
+off_t limit_rate = 0;
/* Name of current file being transferred. */
char *curfile;
@@ -251,7 +251,7 @@ main(int argc, char **argv)
speed = strtod(optarg, &endp);
if (speed <= 0 || *endp != '\0')
usage();
- limit = speed * 1024;
+ limit_rate = speed * 1024;
break;
case 'p':
pflag = 1;
@@ -580,7 +580,7 @@ next: (void) close(fd);
haderr = result >= 0 ? EIO : errno;
statbytes += result;
}
- if (limit)
+ if (limit_rate)
bwlimit(amt);
}
if (showprogress)
@@ -672,7 +672,7 @@ bwlimit(int amount)
return;
lamt *= 8;
- wait = (double)1000000L * lamt / limit;
+ wait = (double)1000000L * lamt / limit_rate;
bwstart.tv_sec = wait / 1000000L;
bwstart.tv_usec = wait % 1000000L;
@@ -899,7 +899,7 @@ bad: run_err("%s: %s", np, strerror(errno));
statbytes += j;
} while (amt > 0);
- if (limit)
+ if (limit_rate)
bwlimit(4096);
if (count == bp->cnt) {