summaryrefslogtreecommitdiffhomepage
path: root/scp.c
diff options
context:
space:
mode:
authorFrancois Perrad <francois.perrad@gadz.org>2016-01-01 09:15:41 +0100
committerMatt Johnston <matt@ucc.asn.au>2016-03-16 22:41:19 +0800
commitc5b77e1b4926757c1cd54d05eb16ab6658829f96 (patch)
tree3fa1b580ada66ec57c720c01ad37ac6077acd700 /scp.c
parenta5e5bab74b17ed85c0b61efb564f13120b8123b7 (diff)
explicitly initialization of static variables
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/scp.c b/scp.c
index 9cdf21d..7e44f54 100644
--- a/scp.c
+++ b/scp.c
@@ -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;
@@ -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;