summaryrefslogtreecommitdiff
path: root/lib/socks.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-03-05 09:37:53 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-03-05 13:03:43 +0100
commit4ed62bc0dc157809372659221872a7df61701130 (patch)
treec850f6d7277bd84ffa61ea6edeb50fcad61037a9 /lib/socks.c
parent39c29626cbf5cdce5d41d0301ba67eeced2a922a (diff)
downloadcurl-4ed62bc0dc157809372659221872a7df61701130.tar.gz
source: fix two 'nread' may be used uninitialized warnings
Both seem to be false positives but we don't like warnings. Closes #3646
Diffstat (limited to 'lib/socks.c')
-rw-r--r--lib/socks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/socks.c b/lib/socks.c
index d2209ad89..d0aba0605 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -54,7 +54,7 @@ int Curl_blockread_all(struct connectdata *conn, /* connection data */
ssize_t buffersize, /* max amount to read */
ssize_t *n) /* amount bytes read */
{
- ssize_t nread;
+ ssize_t nread = 0;
ssize_t allread = 0;
int result;
*n = 0;