summaryrefslogtreecommitdiff
path: root/lib/smb.c
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2019-05-25 10:06:08 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2019-06-05 20:38:06 +0200
commite23c52b3295a525fbaae9e7ed3e7061fea6dffc2 (patch)
tree4a74cf5ed3496a6126f1cc7c4284b6620108db06 /lib/smb.c
parent04ac54e1965041684fc1b6532eba90f58601264e (diff)
downloadcurl-e23c52b3295a525fbaae9e7ed3e7061fea6dffc2.tar.gz
build: fix Codacy warnings
Reduce variable scopes and remove redundant variable stores. Closes https://github.com/curl/curl/pull/3975
Diffstat (limited to 'lib/smb.c')
-rw-r--r--lib/smb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/smb.c b/lib/smb.c
index 76c99a230..5a4b7804d 100644
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -957,7 +957,6 @@ static CURLcode smb_do(struct connectdata *conn, bool *done)
static CURLcode smb_parse_url_path(struct connectdata *conn)
{
- CURLcode result = CURLE_OK;
struct Curl_easy *data = conn->data;
struct smb_request *req = data->req.protop;
struct smb_conn *smbc = &conn->proto.smbc;
@@ -965,7 +964,8 @@ static CURLcode smb_parse_url_path(struct connectdata *conn)
char *slash;
/* URL decode the path */
- result = Curl_urldecode(data, data->state.up.path, 0, &path, NULL, TRUE);
+ CURLcode result = Curl_urldecode(data, data->state.up.path, 0, &path, NULL,
+ TRUE);
if(result)
return result;