# HG changeset patch
# User Francois Perrad <francois.perrad@gadz.org>
# Date 1451636141 -3600
# Node ID bdc28287f077324d060248eccaaabb2799943d0a
# Parent  26622eee1e8b9fd40dcec5aede7fffbd460a9986
explicitly initialization of static variables

diff -r 26622eee1e8b -r bdc28287f077 scp.c
--- a/scp.c	Fri Jan 01 09:03:55 2016 +0100
+++ b/scp.c	Fri Jan 01 09:15:41 2016 +0100
@@ -772,7 +772,7 @@
 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;
 
@@ -940,8 +940,8 @@
 			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 @@
 void
 run_err(const char *fmt,...)
 {
-	static FILE *fp;
+	static FILE *fp = NULL;
 	va_list ap;
 
 	++errs;