From aee4043bfcd434edbbccb53885bc5d918b6e7bcb Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 2 Sep 2025 13:39:51 +0200 Subject: [PATCH] imap/pop3/smtp --- lib/imap.c | 22 +++++++++++----------- lib/pop3.c | 16 ++++++++-------- lib/smtp.c | 20 ++++++++++---------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/lib/imap.c b/lib/imap.c index 7e6b132ba0..41aec8ffab 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -1005,7 +1005,7 @@ static CURLcode imap_state_servergreet_resp(struct Curl_easy *data, int imapcode, imapstate instate) { - (void)instate; /* no use for this yet */ + (void)instate; if(imapcode == IMAP_RESP_PREAUTH) { /* PREAUTH */ @@ -1030,7 +1030,7 @@ static CURLcode imap_state_capability_resp(struct Curl_easy *data, struct connectdata *conn = data->conn; const char *line = curlx_dyn_ptr(&imapc->pp.recvbuf); - (void)instate; /* no use for this yet */ + (void)instate; /* Do we have an untagged response? */ if(imapcode == '*') { @@ -1111,7 +1111,7 @@ static CURLcode imap_state_starttls_resp(struct Curl_easy *data, { CURLcode result = CURLE_OK; - (void)instate; /* no use for this yet */ + (void)instate; /* Pipelining in response is forbidden. */ if(imapc->pp.overflow) @@ -1140,7 +1140,7 @@ static CURLcode imap_state_auth_resp(struct Curl_easy *data, CURLcode result = CURLE_OK; saslprogress progress; - (void)instate; /* no use for this yet */ + (void)instate; result = Curl_sasl_continue(&imapc->sasl, data, imapcode, &progress); if(!result) @@ -1171,7 +1171,7 @@ static CURLcode imap_state_login_resp(struct Curl_easy *data, imapstate instate) { CURLcode result = CURLE_OK; - (void)instate; /* no use for this yet */ + (void)instate; if(imapcode != IMAP_RESP_OK) { failf(data, "Access denied. %c", imapcode); @@ -1194,7 +1194,7 @@ static CURLcode imap_state_listsearch_resp(struct Curl_easy *data, char *line = curlx_dyn_ptr(&imapc->pp.recvbuf); size_t len = imapc->pp.nfinal; - (void)instate; /* No use for this yet */ + (void)instate; if(imapcode == '*') result = Curl_client_write(data, CLIENTWRITE_BODY, line, len); @@ -1217,7 +1217,7 @@ static CURLcode imap_state_select_resp(struct Curl_easy *data, CURLcode result = CURLE_OK; const char *line = curlx_dyn_ptr(&imapc->pp.recvbuf); - (void)instate; /* no use for this yet */ + (void)instate; if(imapcode == '*') { /* See if this is an UIDVALIDITY response */ @@ -1279,7 +1279,7 @@ static CURLcode imap_state_fetch_resp(struct Curl_easy *data, bool parsed = FALSE; curl_off_t size = 0; - (void)instate; /* no use for this yet */ + (void)instate; if(imapcode != '*') { Curl_pgrsSetDownloadSize(data, -1); @@ -1370,7 +1370,7 @@ static CURLcode imap_state_fetch_final_resp(struct Curl_easy *data, { CURLcode result = CURLE_OK; - (void)instate; /* No use for this yet */ + (void)instate; if(imapcode != IMAP_RESP_OK) result = CURLE_WEIRD_SERVER_REPLY; @@ -1388,7 +1388,7 @@ static CURLcode imap_state_append_resp(struct Curl_easy *data, imapstate instate) { CURLcode result = CURLE_OK; - (void)instate; /* No use for this yet */ + (void)instate; if(imapcode != '+') { result = CURLE_UPLOAD_FAILED; @@ -1415,7 +1415,7 @@ static CURLcode imap_state_append_final_resp(struct Curl_easy *data, { CURLcode result = CURLE_OK; - (void)instate; /* No use for this yet */ + (void)instate; if(imapcode != IMAP_RESP_OK) result = CURLE_UPLOAD_FAILED; diff --git a/lib/pop3.c b/lib/pop3.c index 508f8faed3..f5ecfd178b 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -811,7 +811,7 @@ static CURLcode pop3_state_servergreet_resp(struct Curl_easy *data, const char *line; size_t len; - (void)instate; /* no use for this yet */ + (void)instate; if(!pop3c) return CURLE_FAILED_INIT; @@ -866,7 +866,7 @@ static CURLcode pop3_state_capa_resp(struct Curl_easy *data, int pop3code, const char *line; size_t len; - (void)instate; /* no use for this yet */ + (void)instate; if(!pop3c) return CURLE_FAILED_INIT; @@ -954,7 +954,7 @@ static CURLcode pop3_state_starttls_resp(struct Curl_easy *data, { struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN); CURLcode result = CURLE_OK; - (void)instate; /* no use for this yet */ + (void)instate; if(!pop3c) return CURLE_FAILED_INIT; @@ -987,7 +987,7 @@ static CURLcode pop3_state_auth_resp(struct Curl_easy *data, struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN); saslprogress progress; - (void)instate; /* no use for this yet */ + (void)instate; if(!pop3c) return CURLE_FAILED_INIT; @@ -1025,7 +1025,7 @@ static CURLcode pop3_state_apop_resp(struct Curl_easy *data, int pop3code, pop3state instate) { CURLcode result = CURLE_OK; - (void)instate; /* no use for this yet */ + (void)instate; if(pop3code != '+') { failf(data, "Authentication failed: %d", pop3code); @@ -1046,7 +1046,7 @@ static CURLcode pop3_state_user_resp(struct Curl_easy *data, int pop3code, CURLcode result = CURLE_OK; struct connectdata *conn = data->conn; struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN); - (void)instate; /* no use for this yet */ + (void)instate; if(!pop3c) return CURLE_FAILED_INIT; @@ -1070,7 +1070,7 @@ static CURLcode pop3_state_pass_resp(struct Curl_easy *data, int pop3code, pop3state instate) { CURLcode result = CURLE_OK; - (void)instate; /* no use for this yet */ + (void)instate; if(pop3code != '+') { failf(data, "Access denied. %c", pop3code); @@ -1094,7 +1094,7 @@ static CURLcode pop3_state_command_resp(struct Curl_easy *data, struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN); struct pingpong *pp; - (void)instate; /* no use for this yet */ + (void)instate; if(!pop3 || !pop3c) return CURLE_FAILED_INIT; diff --git a/lib/smtp.c b/lib/smtp.c index c52cf0dc56..5dba1f9ea8 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -924,7 +924,7 @@ static CURLcode smtp_state_servergreet_resp(struct Curl_easy *data, smtpstate instate) { CURLcode result = CURLE_OK; - (void)instate; /* no use for this yet */ + (void)instate; if(smtpcode/100 != 2) { failf(data, "Got unexpected smtp-server response: %d", smtpcode); @@ -943,7 +943,7 @@ static CURLcode smtp_state_starttls_resp(struct Curl_easy *data, smtpstate instate) { CURLcode result = CURLE_OK; - (void)instate; /* no use for this yet */ + (void)instate; /* Pipelining in response is forbidden. */ if(smtpc->pp.overflow) @@ -973,7 +973,7 @@ static CURLcode smtp_state_ehlo_resp(struct Curl_easy *data, const char *line = curlx_dyn_ptr(&smtpc->pp.recvbuf); size_t len = smtpc->pp.nfinal; - (void)instate; /* no use for this yet */ + (void)instate; if(smtpcode/100 != 2 && smtpcode != 1) { if(data->set.use_ssl <= CURLUSESSL_TRY @@ -1074,7 +1074,7 @@ static CURLcode smtp_state_helo_resp(struct Curl_easy *data, smtpstate instate) { CURLcode result = CURLE_OK; - (void)instate; /* no use for this yet */ + (void)instate; if(smtpcode/100 != 2) { failf(data, "Remote access denied: %d", smtpcode); @@ -1096,7 +1096,7 @@ static CURLcode smtp_state_auth_resp(struct Curl_easy *data, CURLcode result = CURLE_OK; saslprogress progress; - (void)instate; /* no use for this yet */ + (void)instate; result = Curl_sasl_continue(&smtpc->sasl, data, smtpcode, &progress); if(!result) @@ -1126,7 +1126,7 @@ static CURLcode smtp_state_command_resp(struct Curl_easy *data, char *line = curlx_dyn_ptr(&smtpc->pp.recvbuf); size_t len = smtpc->pp.nfinal; - (void)instate; /* no use for this yet */ + (void)instate; if((smtp->rcpt && smtpcode/100 != 2 && smtpcode != 553 && smtpcode != 1) || (!smtp->rcpt && smtpcode/100 != 2 && smtpcode != 1)) { @@ -1166,7 +1166,7 @@ static CURLcode smtp_state_mail_resp(struct Curl_easy *data, smtpstate instate) { CURLcode result = CURLE_OK; - (void)instate; /* no use for this yet */ + (void)instate; if(smtpcode/100 != 2) { failf(data, "MAIL failed: %d", smtpcode); @@ -1190,7 +1190,7 @@ static CURLcode smtp_state_rcpt_resp(struct Curl_easy *data, bool is_smtp_err = FALSE; bool is_smtp_blocking_err = FALSE; - (void)instate; /* no use for this yet */ + (void)instate; is_smtp_err = (smtpcode/100 != 2); @@ -1246,7 +1246,7 @@ static CURLcode smtp_state_data_resp(struct Curl_easy *data, smtpstate instate) { CURLcode result = CURLE_OK; - (void)instate; /* no use for this yet */ + (void)instate; if(smtpcode != 354) { failf(data, "DATA failed: %d", smtpcode); @@ -1275,7 +1275,7 @@ static CURLcode smtp_state_postdata_resp(struct Curl_easy *data, { CURLcode result = CURLE_OK; - (void)instate; /* no use for this yet */ + (void)instate; if(smtpcode != 250) result = CURLE_WEIRD_SERVER_REPLY;