From cb366681859e000a06660139fd335fb6355f075d Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sat, 9 Apr 2016 00:01:13 +0100 Subject: [PATCH] pscp: pull out upload block size into a constant. --- pscp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pscp.c b/pscp.c index 6e1d0ff9..f6f6c206 100644 --- a/pscp.c +++ b/pscp.c @@ -1711,11 +1711,12 @@ static void source(const char *src) stat_starttime = time(NULL); stat_lasttime = 0; +#define PSCP_SEND_BLOCK 4096 for (i = uint64_make(0,0); uint64_compare(i,size) < 0; - i = uint64_add32(i,4096)) { - char transbuf[4096]; - int j, k = 4096; + i = uint64_add32(i,PSCP_SEND_BLOCK)) { + char transbuf[PSCP_SEND_BLOCK]; + int j, k = PSCP_SEND_BLOCK; if (uint64_compare(uint64_add32(i, k),size) > 0) /* i + k > size */ k = (uint64_subtract(size, i)).lo; /* k = size - i; */