summaryrefslogtreecommitdiffhomepage
path: root/scp.c
diff options
context:
space:
mode:
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/scp.c b/scp.c
index 73262fa..5690330 100644
--- a/scp.c
+++ b/scp.c
@@ -672,7 +672,7 @@ next: if (fd != -1) {
}
continue;
}
-#if PROGRESS_METER
+#ifdef PROGRESS_METER
if (showprogress)
start_progress_meter(curfile, stb.st_size, &statbytes);
#endif
@@ -772,7 +772,7 @@ void
bwlimit(int amount)
{
static struct timeval bwstart, bwend;
- static int lamt, thresh = 16384;
+ static int lamt = 0, thresh = 16384;
uint64_t waitlen;
struct timespec ts, rm;
@@ -841,7 +841,7 @@ sink(int argc, char **argv)
#define atime tv[0]
#define mtime tv[1]
-#define SCREWUP(str) { why = str; goto screwup; }
+#define SCREWUP(str) do { why = str; goto screwup; } while (0)
setimes = targisdir = 0;
mask = umask(0);
@@ -940,8 +940,8 @@ sink(int argc, char **argv)
exit(1);
}
if (targisdir) {
- static char *namebuf;
- static size_t cursize;
+ static char *namebuf = NULL;
+ static size_t cursize = 0;
size_t need;
need = strlen(targ) + strlen(cp) + 250;
@@ -1153,7 +1153,7 @@ usage(void)
void
run_err(const char *fmt,...)
{
- static FILE *fp;
+ static FILE *fp = NULL;
va_list ap;
++errs;