misc: fix code quality findings

- httpsrr: drop redundant checks.
  Follow-up to 809dda3a37 #21354
- httpsrr.h: drop obsolete comment.
  Follow-up to 2b3dfb4ad4 #21175
- ws: drop redundant check in `curl_ws_start_frame()`.
  Follow-up to 37cecfc7b9 #17683
- ws: fix typo in comment.
- tool_operate: fix VMS build. (broken since 2019-07-20, v7.66.0)
  Follow-up to b889408500 #3804

Pointed out by Copilot Code Quality

Closes #21393
This commit is contained in:
Viktor Szakats 2026-04-21 10:14:16 +02:00
parent 2e3607034d
commit 8eb3cb75a3
No known key found for this signature in database
4 changed files with 8 additions and 14 deletions

View file

@ -564,7 +564,7 @@ static CURLcode ws_dec_pass(struct ws_decoder *dec,
dec->state = WS_DEC_INIT;
break;
default:
/* we covered all enums above, but some code analyzers are whimps */
/* we covered all enums above, but some code analyzers are wimps */
result = CURLE_FAILED_INIT;
}
return result;
@ -1878,6 +1878,7 @@ CURL_EXTERN CURLcode curl_ws_start_frame(CURL *curl,
if(!GOOD_EASY_HANDLE(data))
return CURLE_BAD_FUNCTION_ARGUMENT;
if(data->set.ws_raw_mode) {
failf(data, "cannot curl_ws_start_frame() with CURLWS_RAW_MODE enabled");
return CURLE_FAILED_INIT;
@ -1898,12 +1899,6 @@ CURL_EXTERN CURLcode curl_ws_start_frame(CURL *curl,
goto out;
}
if(data->set.ws_raw_mode) {
failf(data, "[WS] cannot start frame in raw mode");
result = CURLE_SEND_ERROR;
goto out;
}
if(ws->enc.payload_remain) {
failf(data, "[WS] previous frame not finished");
result = CURLE_SEND_ERROR;