summaryrefslogtreecommitdiff
path: root/lib/security.c
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2019-05-11 21:42:48 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2019-05-20 08:51:11 +0200
commit10db3ef21eef1c7a1727579952a81ced2f4afc8b (patch)
tree57129a847b5913959063a60290201b1f52482fee /lib/security.c
parent27af2ec219244bef24e6d11649d41aad3668da45 (diff)
downloadgnurl-10db3ef21eef1c7a1727579952a81ced2f4afc8b.tar.gz
gnurl-10db3ef21eef1c7a1727579952a81ced2f4afc8b.tar.bz2
gnurl-10db3ef21eef1c7a1727579952a81ced2f4afc8b.zip
lib: reduce variable scopes
Fixes Codacy/CppCheck warnings. Closes https://github.com/curl/curl/pull/3872
Diffstat (limited to 'lib/security.c')
-rw-r--r--lib/security.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/security.c b/lib/security.c
index d64f49a03..82ae5c2cd 100644
--- a/lib/security.c
+++ b/lib/security.c
@@ -410,8 +410,6 @@ int Curl_sec_read_msg(struct connectdata *conn, char *buffer,
static int sec_set_protection_level(struct connectdata *conn)
{
int code;
- char *pbsz;
- static unsigned int buffer_size = 1 << 20; /* 1048576 */
enum protection_level level = conn->request_data_prot;
DEBUGASSERT(level > PROT_NONE && level < PROT_LAST);
@@ -427,6 +425,9 @@ static int sec_set_protection_level(struct connectdata *conn)
return 0;
if(level) {
+ char *pbsz;
+ static unsigned int buffer_size = 1 << 20; /* 1048576 */
+
code = ftp_send_command(conn, "PBSZ %u", buffer_size);
if(code < 0)
return -1;