lib: cleanup for some typos about spaces and code style
No binary (build failed)
—
(log yok)
| @@ -77,8 +77,6 @@ | |
| * | |
| * Returns: sockets-in-use-bitmap | |
| */ | |
| - | |
| - | |
| CURLcode Curl_ares_pollset(struct Curl_easy *data, | |
| ares_channel channel, | |
| struct easy_pollset *ps) | |
| @@ -666,7 +666,7 @@ CURLcode Curl_async_is_resolved(struct Curl_easy *data, | |
| /* Start at 1ms poll interval */ | |
| thrdd->addr->poll_interval = 1; | |
| else if(elapsed >= thrdd->addr->interval_end) | |
| - | /* Back-off exponentially if last interval expired */ |
| + | /* Back-off exponentially if last interval expired */ |
| thrdd->addr->poll_interval *= 2; | |
| if(thrdd->addr->poll_interval > 250) | |
| @@ -126,7 +126,7 @@ static CURLcode tunnel_init(struct Curl_cfilter *cf, | |
| curlx_dyn_init(&ts->request_data, DYN_HTTP_REQUEST); | |
| Curl_httpchunk_init(data, &ts->ch, TRUE); | |
| - | *pts = ts; |
| + | *pts = ts; |
| connkeep(cf->conn, "HTTP proxy CONNECT"); | |
| return tunnel_reinit(cf, data, ts); | |
| } | |
| @@ -350,7 +350,7 @@ static CURLcode on_resp_header(struct Curl_cfilter *cf, | |
| ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) && | |
| !ISDIGIT(header[12])) { | |
| /* store the HTTP code from the proxy */ | |
| - | data->info.httpproxycode = k->httpcode = (header[9] - '0') * 100 + |
| + | data->info.httpproxycode = k->httpcode = (header[9] - '0') * 100 + |
| (header[10] - '0') * 10 + (header[11] - '0'); | |
| } | |
| return result; | |
| @@ -365,7 +365,6 @@ static CURLcode cf_h2_proxy_ctx_init(struct Curl_cfilter *cf, | |
| goto out; | |
| } | |
| - | |
| /* all set, traffic will be send on connect */ | |
| result = CURLE_OK; | |
| @@ -468,8 +467,8 @@ static CURLcode proxy_h2_progress_ingress(struct Curl_cfilter *cf, | |
| /* Receive data from the "lower" filters, e.g. network until | |
| * it is time to stop or we have enough data for this stream */ | |
| - | while(!ctx->conn_closed && /* not closed the connection */ |
| - | !ctx->tunnel.closed && /* nor the tunnel */ |
| + | while(!ctx->conn_closed && /* not closed the connection */ |
| + | !ctx->tunnel.closed && /* nor the tunnel */ |
| Curl_bufq_is_empty(&ctx->inbufq) && /* and we consumed our input */ | |
| !Curl_bufq_is_full(&ctx->tunnel.recvbuf)) { | |
| @@ -237,7 +237,7 @@ static CURLcode cf_ip_attempt_connect(struct cf_ip_attempt *a, | |
| bool *connected) | |
| { | |
| *connected = a->connected; | |
| - | if(!a->result && !*connected) { |
| + | if(!a->result && !*connected) { |
| /* evaluate again */ | |
| a->result = Curl_conn_cf_connect(a->cf, data, connected); | |
| @@ -375,7 +375,7 @@ int Curl_cpool_check_limits(struct Curl_easy *data, | |
| bundle = cpool_find_bundle(cpool, conn); | |
| live = bundle ? Curl_llist_count(&bundle->conns) : 0; | |
| shutdowns = Curl_cshutdn_dest_count(data, conn->destination); | |
| - | while((live + shutdowns) >= dest_limit) { |
| + | while((live + shutdowns) >= dest_limit) { |
| if(shutdowns) { | |
| /* close one connection in shutdown right away, if we can */ | |
| if(!Curl_cshutdn_close_oldest(data, conn->destination)) | |
| @@ -68,7 +68,7 @@ | |
| */ | |
| #if defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 910) && \ | |
| - | defined(__OPTIMIZE__) && defined(__unix__) && defined(__i386__) |
| + | defined(__OPTIMIZE__) && defined(__unix__) && defined(__i386__) |
| /* workaround icc 9.1 optimizer issue */ | |
| # define vqualifier volatile | |
| #else | |
| @@ -243,7 +243,7 @@ static int setcharset(const unsigned char **p, unsigned char *charset) | |
| case CURLFNM_SCHS_RIGHTBRLEFTBR: | |
| if(c == ']') | |
| return SETCHARSET_OK; | |
| - | state = CURLFNM_SCHS_DEFAULT; |
| + | state = CURLFNM_SCHS_DEFAULT; |
| charset[c] = 1; | |
| (*p)++; | |
| break; | |
| @@ -392,7 +392,8 @@ OM_uint32 Curl_gss_delete_sec_context(OM_uint32 *min, | |
| #define GSS_LOG_BUFFER_LEN 1024 | |
| static size_t display_gss_error(OM_uint32 status, int type, | |
| - | char *buf, size_t len) { |
| + | char *buf, size_t len) |
| + | { |
| OM_uint32 maj_stat; | |
| OM_uint32 min_stat; | |
| OM_uint32 msg_ctx = 0; | |
| @@ -650,10 +650,10 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, | |
| * | |
| * Returns CURLE_OK on success. | |
| */ | |
| - | CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash, |
| - | unsigned char *challenge_client, |
| - | unsigned char *challenge_server, |
| - | unsigned char *lmresp) |
| + | CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash, |
| + | unsigned char *challenge_client, |
| + | unsigned char *challenge_server, |
| + | unsigned char *lmresp) |
| { | |
| unsigned char data[16]; | |
| unsigned char hmac_output[16]; | |
| @@ -932,10 +932,10 @@ CURLcode Curl_sasl_is_blocked(struct SASL *sasl, struct Curl_easy *data) | |
| CURL_SASL_DIGEST, TRUE, NULL); | |
| sasl_unchosen(data, SASL_MECH_NTLM, enabledmechs, | |
| CURL_SASL_NTLM, Curl_auth_is_ntlm_supported(), NULL); | |
| - | sasl_unchosen(data, SASL_MECH_OAUTHBEARER, enabledmechs, TRUE, TRUE, |
| + | sasl_unchosen(data, SASL_MECH_OAUTHBEARER, enabledmechs, TRUE, TRUE, |
| data->set.str[STRING_BEARER] ? | |
| NULL : "CURLOPT_XOAUTH2_BEARER"); | |
| - | sasl_unchosen(data, SASL_MECH_XOAUTH2, enabledmechs, TRUE, TRUE, |
| + | sasl_unchosen(data, SASL_MECH_XOAUTH2, enabledmechs, TRUE, TRUE, |
| data->set.str[STRING_BEARER] ? | |
| NULL : "CURLOPT_XOAUTH2_BEARER"); | |
| } | |
| @@ -344,7 +344,7 @@ static CURL_FORCEINLINE curl_uint64_t Curl_rotr64(curl_uint64_t value, | |
| * Size of the SHA-512/256 resulting digest in words. | |
| * This is the final digest size, not intermediate hash. | |
| */ | |
| - | #define SHA512_256_DIGEST_SIZE_WORDS (SHA512_256_HASH_SIZE_WORDS / 2) |
| + | #define SHA512_256_DIGEST_SIZE_WORDS (SHA512_256_HASH_SIZE_WORDS / 2) |
| /** | |
| * Size of the SHA-512/256 resulting digest in bytes | |
| @@ -760,7 +760,6 @@ static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context) | |
| #endif /* Local SHA-512/256 code */ | |
| - | |
| /** | |
| * Compute SHA-512/256 hash for the given data in one function call | |
| * @param[out] output the pointer to put the hash | |
| @@ -252,7 +252,7 @@ static CURLcode cw_out_ptr_flush(struct cw_out_ctx *ctx, | |
| size_t wlen, nwritten; | |
| CURLcode result; | |
| - | /* If we errored once, we do not invoke the client callback again */ |
| + | /* If we errored once, we do not invoke the client callback again */ |
| if(ctx->errored) | |
| return CURLE_WRITE_ERROR; | |
| @@ -79,7 +79,7 @@ static const char *doh_strerror(DOHcode code) | |
| UNITTEST DOHcode doh_req_encode(const char *host, | |
| DNStype dnstype, | |
| unsigned char *dnsp, /* buffer */ | |
| - | size_t len, /* buffer size */ |
| + | size_t len, /* buffer size */ |
| size_t *olen) /* output length */ | |
| { | |
| const size_t hostlen = strlen(host); | |
| @@ -158,9 +158,9 @@ UNITTEST DOHcode doh_req_encode(const char *host, | |
| *dnsp++ = 0; /* append zero-length label for root */ | |
| - | /* There are assigned TYPE codes beyond 255: use range [1..65535] */ |
| + | /* There are assigned TYPE codes beyond 255: use range [1..65535] */ |
| *dnsp++ = (unsigned char)(255 & (dnstype >> 8)); /* upper 8 bit TYPE */ | |
| - | *dnsp++ = (unsigned char)(255 & dnstype); /* lower 8 bit TYPE */ |
| + | *dnsp++ = (unsigned char)(255 & dnstype); /* lower 8 bit TYPE */ |
| *dnsp++ = '\0'; /* upper 8 bit CLASS */ | |
| *dnsp++ = DNS_CLASS_IN; /* IN - "the Internet" */ | |
| @@ -677,7 +677,7 @@ static DOHcode doh_rdata(const unsigned char *doh, | |
| struct dohentry *d) | |
| { | |
| /* RDATA | |
| - | - A (TYPE 1): 4 bytes |
| + | - A (TYPE 1): 4 bytes |
| - AAAA (TYPE 28): 16 bytes | |
| - NS (TYPE 2): N bytes | |
| - HTTPS (TYPE 65): N bytes */ | |
| @@ -707,7 +707,7 @@ static DOHcode doh_rdata(const unsigned char *doh, | |
| return rc; | |
| break; | |
| case CURL_DNS_TYPE_DNAME: | |
| - | /* explicit for clarity; just skip; rely on synthesized CNAME */ |
| + | /* explicit for clarity; just skip; rely on synthesized CNAME */ |
| break; | |
| default: | |
| /* unsupported type, just skip it */ | |
| @@ -23,7 +23,7 @@ | |
| ***************************************************************************/ | |
| /* Escape and unescape URL encoding in strings. The functions return a new | |
| - | * allocated string or NULL if an error occurred. */ |
| + | * allocated string or NULL if an error occurred. */ |
| #include "curl_setup.h" | |
| @@ -289,7 +289,7 @@ static CURLFORMcode FormAddCheck(struct FormInfo *first_form, | |
| HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER | | |
| HTTPPOST_CALLBACK)) && form->value) { | |
| /* copy value (without strdup; possibly contains null characters) */ | |
| - | size_t clen = (size_t) form->contentslength; |
| + | size_t clen = (size_t) form->contentslength; |
| if(!clen) | |
| clen = strlen(form->value) + 1; | |
| @@ -547,7 +547,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, | |
| retval = CURL_FORMADD_OPTION_TWICE; | |
| else { | |
| if(!array_state) | |
| - | avalue = va_arg(params, char *); |
| + | avalue = va_arg(params, char *); |
| if(avalue) { | |
| curr->userp = avalue; | |
| curr->value = avalue; /* this is not strictly true but we derive a | |
| @@ -1115,7 +1115,6 @@ static CURLcode ftp_state_use_port(struct Curl_easy *data, | |
| port++; | |
| } | |
| - | |
| /* get the name again after the bind() so that we can extract the | |
| port number it uses now */ | |
| sslen = sizeof(ss); | |
| @@ -1976,7 +1975,6 @@ static CURLcode ftp_state_pasv_resp(struct Curl_easy *data, | |
| goto error; | |
| } | |
| - | |
| /* | |
| * When this is used from the multi interface, this might've returned with | |
| * the 'connected' set to FALSE and thus we are now awaiting a non-blocking | |
| @@ -2488,7 +2486,6 @@ static CURLcode ftp_state_get_resp(struct Curl_easy *data, | |
| data->req.size = -1; /* default unknown size */ | |
| - | |
| /* | |
| * It appears that there are FTP-servers that return size 0 for files when | |
| * SIZE is used on the file while being in BINARY mode. To work around | |
| @@ -4081,7 +4081,7 @@ static CURLcode http_on_response(struct Curl_easy *data, | |
| k->download_done = TRUE; | |
| /* If max download size is *zero* (nothing) we already have | |
| - | nothing and can safely return ok now! But for HTTP/2, we would |
| + | nothing and can safely return ok now! But for HTTP/2, we would |
| like to call http2_handle_stream_close to properly close a | |
| stream. In order to do this, we keep reading until we | |
| close the stream. */ | |
| @@ -84,7 +84,7 @@ static ssize_t detect_line(struct h1_req_parser *parser, | |
| const char *buf, const size_t buflen, | |
| CURLcode *err) | |
| { | |
| - | const char *line_end; |
| + | const char *line_end; |
| DEBUGASSERT(!parser->line); | |
| line_end = memchr(buf, '\n', buflen); | |
| @@ -136,7 +136,7 @@ static ssize_t next_line(struct h1_req_parser *parser, | |
| static CURLcode start_req(struct h1_req_parser *parser, | |
| const char *scheme_default, int options) | |
| { | |
| - | const char *p, *m, *target, *hv, *scheme, *authority, *path; |
| + | const char *p, *m, *target, *hv, *scheme, *authority, *path; |
| size_t m_len, target_len, hv_len, scheme_len, authority_len, path_len; | |
| size_t i; | |
| CURLU *url = NULL; | |
| @@ -796,7 +796,7 @@ static ssize_t send_callback(nghttp2_session *h2, | |
| ctx->nw_out_blocked = 1; | |
| return NGHTTP2_ERR_WOULDBLOCK; | |
| } | |
| - | return (nwritten > SSIZE_MAX) ? |
| + | return (nwritten > SSIZE_MAX) ? |
| NGHTTP2_ERR_CALLBACK_FAILURE : (ssize_t)nwritten; | |
| } | |
| @@ -2558,7 +2558,7 @@ static CURLcode cf_h2_connect(struct Curl_cfilter *cf, | |
| } | |
| /* Send out our SETTINGS and ACKs and such. If that blocks, we | |
| - | * have it buffered and can count this filter as being connected */ |
| + | * have it buffered and can count this filter as being connected */ |
| result = h2_progress_egress(cf, data); | |
| if(result && (result != CURLE_AGAIN)) | |
| goto out; | |
| @@ -2945,7 +2945,7 @@ CURLcode Curl_http2_upgrade(struct Curl_easy *data, | |
| struct cf_h2_ctx *ctx; | |
| CURLcode result; | |
| - | DEBUGASSERT(Curl_conn_http_version(data, conn) < 20); |
| + | DEBUGASSERT(Curl_conn_http_version(data, conn) < 20); |
| result = http2_cfilter_add(&cf, data, conn, sockindex, TRUE); | |
| if(result) | |
| @@ -274,7 +274,6 @@ static CURLcode make_headers(struct Curl_easy *data, | |
| } | |
| } | |
| - | |
| if(*content_sha256_header) { | |
| tmp_head = curl_slist_append(head, content_sha256_header); | |
| if(!tmp_head) | |
| @@ -412,7 +411,8 @@ fail: | |
| static const char *parse_content_sha_hdr(struct Curl_easy *data, | |
| const char *provider1, | |
| size_t plen, | |
| - | size_t *value_len) { |
| + | size_t *value_len) |
| + | { |
| char key[CONTENT_SHA256_KEY_LEN]; | |
| size_t key_len; | |
| const char *value; | |
| @@ -167,7 +167,7 @@ static CURLcode httpsrr_opt(struct Curl_easy *data, | |
| unsigned short code; | |
| size_t len = 0; | |
| - | code = ares_dns_rr_get_opt(rr, key, idx, &val, &len); |
| + | code = ares_dns_rr_get_opt(rr, key, idx, &val, &len); |
| return Curl_httpsrr_set(data, hinfo, code, val, len); | |
| } | |
| @@ -1966,7 +1966,6 @@ static CURLcode cr_mime_read(struct Curl_easy *data, | |
| size_t nread; | |
| char tmp[256]; | |
| - | |
| /* Once we have errored, we will return the same error forever */ | |
| if(ctx->errored) { | |
| CURL_TRC_READ(data, "cr_mime_read(len=%zu) is errored -> %d, eos=0", | |
| @@ -2584,7 +2584,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, | |
| DEBUGASSERT(data->conn); | |
| if(data->conn->bits.multiplex) | |
| /* Check if we can move pending requests to send pipe */ | |
| - | process_pending_handles(multi); /* multiplexed */ |
| + | process_pending_handles(multi); /* multiplexed */ |
| /* Only perform the transfer if there is a good socket to work with. | |
| Having both BAD is a signal to skip immediately to DONE */ | |
| @@ -1235,7 +1235,6 @@ static CURLcode oldap_recv(struct Curl_easy *data, int sockindex, char *buf, | |
| break; | |
| } | |
| - | |
| if(!result) | |
| result = client_write(data, STRCONST("\n"), NULL, 0, NULL, 0); | |
| if(!result) | |
| @@ -362,7 +362,7 @@ static int parsedate(const char *date, time_t *output) | |
| time_t t = 0; | |
| int wdaynum = -1; /* day of the week number, 0-6 (mon-sun) */ | |
| int monnum = -1; /* month of the year number, 0-11 */ | |
| - | int mdaynum = -1; /* day of month, 1 - 31 */ |
| + | int mdaynum = -1; /* day of month, 1 - 31 */ |
| int hournum = -1; | |
| int minnum = -1; | |
| int secnum = -1; | |
| @@ -284,7 +284,7 @@ CURLcode Curl_pp_readresp(struct Curl_easy *data, | |
| size_t full = curlx_dyn_len(&pp->recvbuf); | |
| /* trim off the "final" leading part */ | |
| - | curlx_dyn_tail(&pp->recvbuf, full - pp->nfinal); |
| + | curlx_dyn_tail(&pp->recvbuf, full - pp->nfinal); |
| pp->nfinal = 0; /* now gone */ | |
| } | |
| @@ -64,7 +64,7 @@ CURLcode Curl_req_soft_reset(struct SingleRequest *req, | |
| req->header = FALSE; | |
| req->headerline = 0; | |
| req->headerbytecount = 0; | |
| - | req->allheadercount = 0; |
| + | req->allheadercount = 0; |
| req->deductheadercount = 0; | |
| req->httpversion_sent = 0; | |
| req->httpversion = 0; | |
| @@ -132,7 +132,7 @@ void Curl_req_hard_reset(struct SingleRequest *req, struct Curl_easy *data) | |
| req->writebytecount = 0; | |
| req->start = t0; | |
| req->headerbytecount = 0; | |
| - | req->allheadercount = 0; |
| + | req->allheadercount = 0; |
| req->deductheadercount = 0; | |
| req->headerline = 0; | |
| req->offset = 0; | |
| @@ -1159,7 +1159,6 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, | |
| s->connect_only_ws = (arg == 2); | |
| break; | |
| - | |
| #ifdef USE_SSH | |
| case CURLOPT_SSH_AUTH_TYPES: | |
| s->ssh_auth_types = (int)arg; | |
| @@ -1683,7 +1682,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option, | |
| /* | |
| * A string with POST data. Makes curl HTTP POST. Even if it is NULL. | |
| * If needed, CURLOPT_POSTFIELDSIZE must have been set prior to | |
| - | * CURLOPT_COPYPOSTFIELDS and not altered later. |
| + | * CURLOPT_COPYPOSTFIELDS and not altered later. |
| */ | |
| if(!ptr || s->postfieldsize == -1) | |
| result = Curl_setstropt(&s->str[STRING_COPYPOSTFIELDS], ptr); | |
| @@ -1881,7 +1881,7 @@ static CURLcode smtp_parse_address(const char *fqma, char **address, | |
| /* Duplicate the fully qualified email address so we can manipulate it, | |
| ensuring it does not contain the delimiters if specified */ | |
| - | char *dup = strdup(fqma[0] == '<' ? fqma + 1 : fqma); |
| + | char *dup = strdup(fqma[0] == '<' ? fqma + 1 : fqma); |
| if(!dup) | |
| return CURLE_OUT_OF_MEMORY; | |
| @@ -528,7 +528,7 @@ process_state: | |
| /* socks4a, not resolving locally, sends the hostname. | |
| * add an invalid address + user + hostname */ | |
| unsigned char buf[4] = { 0, 0, 0, 1 }; | |
| - | size_t hlen = strlen(sx->hostname) + 1; /* including NUL */ |
| + | size_t hlen = strlen(sx->hostname) + 1; /* including NUL */ |
| if(hlen > 255) { | |
| failf(data, "SOCKS4: too long hostname"); | |
| @@ -132,7 +132,6 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(struct Curl_cfilter *cf, | |
| const size_t serviceptr_length = strlen(serviceptr); | |
| gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT; | |
| - | |
| /* GSS-API request looks like | |
| * +----+------+-----+----------------+ | |
| * |VER | MTYP | LEN | TOKEN | | |
| @@ -87,7 +87,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(struct Curl_cfilter *cf, | |
| unsigned long qop; | |
| unsigned char socksreq[4]; /* room for GSS-API exchange header only */ | |
| const char *service = data->set.str[STRING_PROXY_SERVICE_NAME] ? | |
| - | data->set.str[STRING_PROXY_SERVICE_NAME] : "rcmd"; |
| + | data->set.str[STRING_PROXY_SERVICE_NAME] : "rcmd"; |
| char *etbuf; | |
| size_t etbuf_size; | |
| @@ -156,7 +156,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(struct Curl_cfilter *cf, | |
| (void)curlx_nonblock(sock, FALSE); | |
| /* As long as we need to keep sending some context info, and there is no */ | |
| - | /* errors, keep sending it... */ |
| + | /* errors, keep sending it... */ |
| for(;;) { | |
| TCHAR *sname; | |
| @@ -505,7 +505,6 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(struct Curl_cfilter *cf, | |
| goto error; | |
| } | |
| - | |
| if(!data->set.socks5_gssapi_nec) { | |
| wrap_desc.cBuffers = 2; | |
| sspi_w_token[0].BufferType = SECBUFFER_STREAM; | |
| @@ -477,7 +477,7 @@ static CURLcode tftp_send_first(struct tftp_conn *state, | |
| curl_msnprintf((char *)state->spacket.data + 2, | |
| state->blksize, | |
| - | "%s%c%s%c", filename, '\0', mode, '\0'); |
| + | "%s%c%s%c", filename, '\0', mode, '\0'); |
| sbytes = 4 + strlen(filename) + strlen(mode); | |
| /* optional addition of TFTP options */ | |
| @@ -2187,7 +2187,6 @@ static CURLcode parse_proxy(struct Curl_easy *data, | |
| bool is_unix_proxy = FALSE; | |
| #endif | |
| - | |
| if(!uhp) { | |
| result = CURLE_OUT_OF_MEMORY; | |
| goto error; | |
| @@ -66,7 +66,6 @@ bool Curl_auth_is_spnego_supported(void) | |
| Curl_pSecFn->FreeContextBuffer(SecurityPackage); | |
| } | |
| - | |
| return status == SEC_E_OK; | |
| } | |
| @@ -1214,7 +1214,8 @@ static int cb_h3_stop_sending(nghttp3_conn *conn, int64_t stream_id, | |
| static int cb_h3_reset_stream(nghttp3_conn *conn, int64_t sid, | |
| uint64_t app_error_code, void *user_data, | |
| - | void *stream_user_data) { |
| + | void *stream_user_data) |
| + | { |
| struct Curl_cfilter *cf = user_data; | |
| struct cf_ngtcp2_ctx *ctx = cf->ctx; | |
| curl_int64_t stream_id = (curl_int64_t)sid; | |
| @@ -951,7 +951,8 @@ static int cb_h3_stop_sending(nghttp3_conn *conn, int64_t sid, | |
| static int cb_h3_reset_stream(nghttp3_conn *conn, int64_t sid, | |
| uint64_t app_error_code, void *user_data, | |
| - | void *stream_user_data) { |
| + | void *stream_user_data) |
| + | { |
| struct Curl_cfilter *cf = user_data; | |
| struct cf_osslq_ctx *ctx = cf->ctx; | |
| struct Curl_easy *data = stream_user_data; | |
| @@ -869,7 +869,6 @@ static CURLcode cf_quiche_recv(struct Curl_cfilter *cf, struct Curl_easy *data, | |
| if(!stream) | |
| return CURLE_RECV_ERROR; | |
| - | |
| if(!Curl_bufq_is_empty(&stream->recvbuf)) { | |
| result = Curl_bufq_cread(&stream->recvbuf, buf, len, pnread); | |
| CURL_TRC_CF(data, cf, "[%" FMT_PRIu64 "] read recvbuf(len=%zu) " | |
| @@ -155,7 +155,6 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf, | |
| } | |
| #endif | |
| - | |
| while((sent = sendmsg(qctx->sockfd, &msg, 0)) == -1 && | |
| SOCKERRNO == SOCKEINTR) | |
| ; | |
| @@ -297,7 +297,6 @@ static void myssh_set_state(struct Curl_easy *data, | |
| "QUIT" | |
| }; | |
| - | |
| if(sshc->state != nowstate) { | |
| infof(data, "SSH %p state change from %s to %s (line %d)", | |
| (void *) sshc, names[sshc->state], names[nowstate], | |
| @@ -2439,7 +2438,6 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, | |
| } | |
| } while(!rc && (sshc->state != SSH_STOP)); | |
| - | |
| if(rc == SSH_AGAIN) { | |
| /* we would block, we need to wait for the socket to be ready (in the | |
| right direction too)! */ | |
| @@ -3573,9 +3573,9 @@ static CURLcode ssh_do(struct Curl_easy *data, bool *done) | |
| Curl_pgrsSetDownloadSize(data, -1); | |
| if(conn->handler->protocol & CURLPROTO_SCP) | |
| - | result = scp_perform(data, &connected, done); |
| + | result = scp_perform(data, &connected, done); |
| else | |
| - | result = sftp_perform(data, &connected, done); |
| + | result = sftp_perform(data, &connected, done); |
| return result; | |
| } | |
| @@ -636,7 +636,6 @@ CURLcode Curl_gtls_client_trust_setup(struct Curl_cfilter *cf, | |
| CURLcode result; | |
| int rc; | |
| - | |
| /* Consider the X509 store cacheable if it comes exclusively from a CAfile, | |
| or no source is provided and we are falling back to OpenSSL's built-in | |
| default. */ | |
| @@ -1969,7 +1968,8 @@ out: | |
| */ | |
| static CURLcode gtls_connect_common(struct Curl_cfilter *cf, | |
| struct Curl_easy *data, | |
| - | bool *done) { |
| + | bool *done) |
| + | { |
| struct ssl_connect_data *connssl = cf->ctx; | |
| struct gtls_ssl_backend_data *backend = | |
| (struct gtls_ssl_backend_data *)connssl->backend; | |
| @@ -847,7 +847,6 @@ mbed_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data) | |
| mbedtls_ssl_list_ciphersuites()); | |
| } | |
| - | |
| #ifdef MBEDTLS_SSL_RENEGOTIATION | |
| mbedtls_ssl_conf_renegotiation(&backend->config, | |
| MBEDTLS_SSL_RENEGOTIATION_ENABLED); | |
| @@ -657,7 +657,8 @@ cleanup: | |
| static void | |
| init_config_builder_alpn(struct Curl_easy *data, | |
| const struct ssl_connect_data *connssl, | |
| - | struct rustls_client_config_builder *config_builder) { |
| + | struct rustls_client_config_builder *config_builder) |
| + | { |
| struct alpn_proto_buf proto; | |
| rustls_slice_bytes alpn[ALPN_ENTRIES_MAX]; | |
| size_t i; | |
| @@ -709,7 +710,8 @@ init_config_builder_verifier(struct Curl_easy *data, | |
| struct rustls_client_config_builder *builder, | |
| const struct ssl_primary_config *conn_config, | |
| const struct curl_blob *ca_info_blob, | |
| - | const char * const ssl_cafile) { |
| + | const char * const ssl_cafile) |
| + | { |
| const struct rustls_root_cert_store *roots = NULL; | |
| struct rustls_root_cert_store_builder *roots_builder = NULL; | |
| struct rustls_web_pki_server_cert_verifier_builder *verifier_builder = NULL; | |
| @@ -2646,7 +2646,6 @@ static CURLcode schannel_pkp_pin_peer_pubkey(struct Curl_cfilter *cf, | |
| break; /* failed */ | |
| } | |
| - | |
| if(!(((pCertContextServer->dwCertEncodingType & X509_ASN_ENCODING) != 0) && | |
| (pCertContextServer->cbCertEncoded > 0))) | |
| break; | |
| @@ -1952,7 +1952,7 @@ CURLcode Curl_alpn_to_proto_buf(struct alpn_proto_buf *buf, | |
| len = strlen(spec->entries[i]); | |
| if(len >= ALPN_NAME_MAX) | |
| return CURLE_FAILED_INIT; | |
| - | blen = (unsigned char)len; |
| + | blen = (unsigned char)len; |
| if(off + blen + 1 >= (int)sizeof(buf->data)) | |
| return CURLE_FAILED_INIT; | |
| buf->data[off++] = blen; | |
| @@ -578,7 +578,7 @@ wssl_setup_session(struct Curl_cfilter *cf, | |
| if(sess_reuse_cb) { | |
| result = sess_reuse_cb(cf, data, alpns, scs, &do_early_data); | |
| if(result) | |
| - | goto out; |
| + | goto out; |
| } | |
| #ifdef WOLFSSL_EARLY_DATA | |
| if(do_early_data) { | |
| @@ -191,7 +191,7 @@ static const char *getASN1Element_(struct Curl_asn1Element *elem, | |
| if an error occurs. */ | |
| if(!beg || !end || beg >= end || !*beg || | |
| ((size_t)(end - beg) > CURL_ASN1_MAX) || | |
| - | lvl >= CURL_ASN1_MAX_RECURSIONS) |
| + | lvl >= CURL_ASN1_MAX_RECURSIONS) |
| return NULL; | |
| /* Process header byte. */ | |
| @@ -1560,7 +1560,6 @@ CURLcode curl_ws_recv(CURL *d, void *buffer, | |
| return CURLE_BAD_FUNCTION_ARGUMENT; | |
| } | |
| - | |
| memset(&ctx, 0, sizeof(ctx)); | |
| ctx.data = data; | |
| ctx.ws = ws; | |
| @@ -173,7 +173,7 @@ static int sys_crelnm(const char *logname, | |
| } | |
| - | /* Start of DECC RTL Feature handling */ |
| + | /* Start of DECC RTL Feature handling */ |
| /* | |
| ** Sets default value for a feature | |
| @@ -213,7 +213,6 @@ static void set_features(void) | |
| /* We always want the new parse style */ | |
| set_feature_default("DECC$ARGV_PARSE_STYLE", ENABLE); | |
| - | |
| /* Unless we are in POSIX compliant mode, we want the old POSIX root | |
| * enabled. | |
| */ | |
| @@ -244,7 +243,7 @@ static void set_features(void) | |
| /* Gets rid of output logs with single character lines in them. */ | |
| set_feature_default("DECC$STDIO_CTX_EOL", ENABLE); | |
| - | /* Fix mv aa.bb aa */ |
| + | /* Fix mv aa.bb aa */ |
| set_feature_default("DECC$RENAME_NO_INHERIT", ENABLE); | |
| if(use_unix_settings) { | |
| @@ -283,7 +282,7 @@ static void set_features(void) | |
| /* Set strtol to proper behavior */ | |
| set_feature_default("DECC$STRTOL_ERANGE", ENABLE); | |
| - | /* Commented here to prevent future bugs: A program or user should */ |
| + | /* Commented here to prevent future bugs: A program or user should */ |
| /* never ever enable DECC$POSIX_STYLE_UID. */ | |
| /* It will probably break all code that accesses UIDs */ | |
| /* do_not_set_default ("DECC$POSIX_STYLE_UID", TRUE); */ | |
| @@ -2194,7 +2194,6 @@ static CURLcode run_all_transfers(CURLSH *share, | |
| global->noprogress = orig_noprogress; | |
| global->isatty = orig_isatty; | |
| - | |
| return result; | |
| } | |
| @@ -253,7 +253,6 @@ bool progress_meter(CURLM *multi, | |
| speed = dls > uls ? dls : uls; | |
| } | |
| - | |
| if(dlknown && speed) { | |
| curl_off_t est = all_dltotal / speed; | |
| curl_off_t left = (all_dltotal - all_dlnow) / speed; | |