mirror of
https://github.com/curl/curl.git
synced 2026-08-25 16:33:38 +03:00
build: fix Codacy warnings
Reduce variable scopes and remove redundant variable stores. Closes https://github.com/curl/curl/pull/3975
This commit is contained in:
parent
04ac54e196
commit
e23c52b329
23 changed files with 80 additions and 123 deletions
18
lib/ftp.c
18
lib/ftp.c
|
|
@ -565,10 +565,8 @@ static CURLcode ftp_readresp(curl_socket_t sockfd,
|
|||
#ifdef HAVE_GSSAPI
|
||||
char * const buf = data->state.buffer;
|
||||
#endif
|
||||
CURLcode result = CURLE_OK;
|
||||
int code;
|
||||
|
||||
result = Curl_pp_readresp(sockfd, pp, &code, size);
|
||||
CURLcode result = Curl_pp_readresp(sockfd, pp, &code, size);
|
||||
|
||||
#if defined(HAVE_GSSAPI)
|
||||
/* handle the security-oriented responses 6xx ***/
|
||||
|
|
@ -1499,24 +1497,14 @@ static CURLcode ftp_state_list(struct connectdata *conn)
|
|||
|
||||
static CURLcode ftp_state_retr_prequote(struct connectdata *conn)
|
||||
{
|
||||
CURLcode result = CURLE_OK;
|
||||
|
||||
/* We've sent the TYPE, now we must send the list of prequote strings */
|
||||
|
||||
result = ftp_state_quote(conn, TRUE, FTP_RETR_PREQUOTE);
|
||||
|
||||
return result;
|
||||
return ftp_state_quote(conn, TRUE, FTP_RETR_PREQUOTE);
|
||||
}
|
||||
|
||||
static CURLcode ftp_state_stor_prequote(struct connectdata *conn)
|
||||
{
|
||||
CURLcode result = CURLE_OK;
|
||||
|
||||
/* We've sent the TYPE, now we must send the list of prequote strings */
|
||||
|
||||
result = ftp_state_quote(conn, TRUE, FTP_STOR_PREQUOTE);
|
||||
|
||||
return result;
|
||||
return ftp_state_quote(conn, TRUE, FTP_STOR_PREQUOTE);
|
||||
}
|
||||
|
||||
static CURLcode ftp_state_type(struct connectdata *conn)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue