mirror of
https://github.com/curl/curl.git
synced 2026-08-06 19:16:15 +03:00
tidy-up: miscellaneous
- GHA/windows: drop redundant double-quotes. - CMake/PickyWarnings: improve/shorten comment. - INTERNALS: fix typo in LibreSSL release date. - drop redundant parentheses from single variables and sole `#if` expressions. - cf-ip-happy: fix missing space from error string. - telnet: fix parentheses in commented PP code. - lib1922: fix typo test output text. - smbserver: unfold lines. - smbserver: use f-string. - smbserver: initialize binary string as b``. - fix typos in comments. Closes #21972
This commit is contained in:
parent
04a85a1d38
commit
2a606c68fa
16 changed files with 29 additions and 32 deletions
|
|
@ -342,7 +342,7 @@ static CURLcode cf_ip_ballers_init(struct cf_ip_ballers *bs,
|
|||
bs->cf_create = get_cf_create(transport_peer, !!tunnel_peer);
|
||||
if(!bs->cf_create) {
|
||||
failf(data, "unsupported transport type %u%s",
|
||||
transport_peer, tunnel_peer ? "to proxy" : "");
|
||||
transport_peer, tunnel_peer ? " to proxy" : "");
|
||||
return CURLE_UNSUPPORTED_PROTOCOL;
|
||||
}
|
||||
Curl_peer_link(&bs->origin, origin);
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@
|
|||
#include "curlx/dynbuf.h"
|
||||
#include "headers.h"
|
||||
|
||||
#if (NGHTTP2_VERSION_NUM < 0x010c00)
|
||||
#if NGHTTP2_VERSION_NUM < 0x010c00
|
||||
#error too old nghttp2 version, upgrade!
|
||||
#endif
|
||||
|
||||
#if (NGHTTP2_VERSION_NUM >= 0x010c00)
|
||||
#if NGHTTP2_VERSION_NUM >= 0x010c00
|
||||
#define NGHTTP2_HAS_SET_LOCAL_WINDOW_SIZE 1
|
||||
#endif
|
||||
|
||||
|
|
|
|||
16
lib/multi.c
16
lib/multi.c
|
|
@ -2504,7 +2504,7 @@ static CURLMcode multistate_connecting(struct Curl_easy *data,
|
|||
}
|
||||
if(!Curl_xfer_recv_is_paused(data)) {
|
||||
*result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &connected);
|
||||
if(connected && !(*result)) {
|
||||
if(connected && !*result) {
|
||||
if(!data->conn->bits.reuse &&
|
||||
Curl_conn_is_multiplex(data->conn, FIRSTSOCKET)) {
|
||||
/* new connection, can multiplex, wake pending handles */
|
||||
|
|
@ -2531,7 +2531,7 @@ static CURLMcode multistate_protoconnect(struct Curl_easy *data,
|
|||
{
|
||||
bool protocol_connected = FALSE;
|
||||
|
||||
if(!(*result) && data->conn->bits.reuse) {
|
||||
if(!*result && data->conn->bits.reuse) {
|
||||
/* ftp seems to hang when protoconnect on reused connection since we
|
||||
* handle PROTOCONNECT in general inside the filters, it seems wrong to
|
||||
* restart this on a reused connection.
|
||||
|
|
@ -2539,14 +2539,14 @@ static CURLMcode multistate_protoconnect(struct Curl_easy *data,
|
|||
multistate(data, MSTATE_DO);
|
||||
return CURLM_CALL_MULTI_PERFORM;
|
||||
}
|
||||
if(!(*result))
|
||||
if(!*result)
|
||||
*result = protocol_connect(data, &protocol_connected);
|
||||
if(!(*result) && !protocol_connected) {
|
||||
if(!*result && !protocol_connected) {
|
||||
/* switch to waiting state */
|
||||
multistate(data, MSTATE_PROTOCONNECTING);
|
||||
return CURLM_CALL_MULTI_PERFORM;
|
||||
}
|
||||
else if(!(*result)) {
|
||||
else if(!*result) {
|
||||
/* protocol connect has completed, go WAITDO or DO */
|
||||
multistate(data, MSTATE_DO);
|
||||
return CURLM_CALL_MULTI_PERFORM;
|
||||
|
|
@ -2567,7 +2567,7 @@ static CURLMcode multistate_protoconnecting(struct Curl_easy *data,
|
|||
|
||||
/* protocol-specific connect phase */
|
||||
*result = protocol_connecting(data, &protocol_connected);
|
||||
if(!(*result) && protocol_connected) {
|
||||
if(!*result && protocol_connected) {
|
||||
/* after the connect has completed, go WAITDO or DO */
|
||||
multistate(data, MSTATE_DO);
|
||||
return CURLM_CALL_MULTI_PERFORM;
|
||||
|
|
@ -2590,7 +2590,7 @@ static CURLMcode multistate_doing(struct Curl_easy *data,
|
|||
/* we continue DOING until the DO phase is complete */
|
||||
DEBUGASSERT(data->conn);
|
||||
*result = protocol_doing(data, &dophase_done);
|
||||
if(!(*result)) {
|
||||
if(!*result) {
|
||||
if(dophase_done) {
|
||||
/* after DO, go DO_DONE or DO_MORE */
|
||||
multistate(data, data->conn->bits.do_more ?
|
||||
|
|
@ -2619,7 +2619,7 @@ static CURLMcode multistate_doing_more(struct Curl_easy *data,
|
|||
DEBUGASSERT(data->conn);
|
||||
*result = multi_do_more(data, &control);
|
||||
|
||||
if(!(*result)) {
|
||||
if(!*result) {
|
||||
if(control != DOMORE_INCOMPLETE) {
|
||||
/* if DONE, advance to DO_DONE
|
||||
if GOBACK, go back to DOING */
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ void Curl_peer_unlink(struct Curl_peer **ppeer);
|
|||
/* TRUE if both peers are NULL or have completely same properties. */
|
||||
bool Curl_peer_equal(struct Curl_peer *p1, struct Curl_peer *p2);
|
||||
|
||||
/* TRUE if both peers are NULL or have properties except the scheme. */
|
||||
/* TRUE if both peers are NULL or have same properties except the scheme. */
|
||||
bool Curl_peer_same_destination(struct Curl_peer *p1, struct Curl_peer *p2);
|
||||
|
||||
CURLcode Curl_peer_from_url(CURLU *uh, struct Curl_easy *data,
|
||||
|
|
|
|||
|
|
@ -75,8 +75,8 @@
|
|||
#define CURL_SB_LEN(x) ((x)->subend - (x)->subpointer)
|
||||
|
||||
/* For posterity:
|
||||
#define CURL_SB_PEEK(x) ((*x->subpointer)&0xff)
|
||||
#define CURL_SB_EOF(x) (x->subpointer >= x->subend) */
|
||||
#define CURL_SB_PEEK(x) (*(x)->subpointer & 0xff)
|
||||
#define CURL_SB_EOF(x) ((x)->subpointer >= (x)->subend) */
|
||||
|
||||
/* For negotiation compliant to RFC 1143 */
|
||||
#define CURL_NO 0
|
||||
|
|
|
|||
|
|
@ -583,7 +583,7 @@ static nghttp3_ssize cb_h3_tunnel_read_data(nghttp3_conn *conn,
|
|||
nwritten += vec[nvecs].len;
|
||||
++nvecs;
|
||||
}
|
||||
DEBUGASSERT(nvecs > 0); /* we SHOULD have been be able to peek */
|
||||
DEBUGASSERT(nvecs > 0); /* we SHOULD have been able to peek */
|
||||
}
|
||||
|
||||
if(!nwritten) {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ static const char *c_memmem(const void *haystack, size_t haystacklen,
|
|||
return NULL;
|
||||
first = *(const char *)needle;
|
||||
for(p = (const char *)haystack; p <= (str_limit - needlelen); p++)
|
||||
if(((*p) == first) && !memcmp(p, needle, needlelen))
|
||||
if((*p == first) && !memcmp(p, needle, needlelen))
|
||||
return p;
|
||||
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue