mirror of
https://github.com/curl/curl.git
synced 2026-08-24 11:23:31 +03:00
cleanup: make local functions static
urlapi: turn three local-only functions into statics conncache: make conncache_find_first_connection static multi: make detach_connnection static connect: make getaddressinfo static curl_ntlm_core: make hmac_md5 static http2: make two functions static http: make http_setup_conn static connect: make tcpnodelay static tests: make UNITTEST a thing to mark functions with, so they can be static for normal builds and non-static for unit test builds ... and mark Curl_shuffle_addr accordingly. url: make up_free static setopt: make vsetopt static curl_endian: make write32_le static rtsp: make rtsp_connisdead static warnless: remove unused functions memdebug: remove one unused function, made another static
This commit is contained in:
parent
9a36c0ae21
commit
05b100aee2
22 changed files with 103 additions and 160 deletions
10
lib/http2.c
10
lib/http2.c
|
|
@ -357,7 +357,7 @@ int Curl_http2_ver(char *p, size_t len)
|
|||
https://tools.ietf.org/html/rfc7540#page-77
|
||||
nghttp2_error_code enums are identical.
|
||||
*/
|
||||
const char *Curl_http2_strerror(uint32_t err)
|
||||
static const char *http2_strerror(uint32_t err)
|
||||
{
|
||||
#ifndef NGHTTP2_HAS_HTTP2_STRERROR
|
||||
const char *str[] = {
|
||||
|
|
@ -837,7 +837,7 @@ static int on_stream_close(nghttp2_session *session, int32_t stream_id,
|
|||
return 0;
|
||||
}
|
||||
H2BUGF(infof(data_s, "on_stream_close(), %s (err %d), stream %u\n",
|
||||
Curl_http2_strerror(error_code), error_code, stream_id));
|
||||
http2_strerror(error_code), error_code, stream_id));
|
||||
stream = data_s->req.protop;
|
||||
if(!stream)
|
||||
return NGHTTP2_ERR_CALLBACK_FAILURE;
|
||||
|
|
@ -1197,7 +1197,7 @@ void Curl_http2_done(struct connectdata *conn, bool premature)
|
|||
/*
|
||||
* Initialize nghttp2 for a Curl connection
|
||||
*/
|
||||
CURLcode Curl_http2_init(struct connectdata *conn)
|
||||
static CURLcode http2_init(struct connectdata *conn)
|
||||
{
|
||||
if(!conn->proto.httpc.h2) {
|
||||
int rc;
|
||||
|
|
@ -1431,7 +1431,7 @@ static ssize_t http2_handle_stream_close(struct connectdata *conn,
|
|||
}
|
||||
else if(httpc->error_code != NGHTTP2_NO_ERROR) {
|
||||
failf(data, "HTTP/2 stream %d was not closed cleanly: %s (err %u)",
|
||||
stream->stream_id, Curl_http2_strerror(httpc->error_code),
|
||||
stream->stream_id, http2_strerror(httpc->error_code),
|
||||
httpc->error_code);
|
||||
*err = CURLE_HTTP2_STREAM;
|
||||
return -1;
|
||||
|
|
@ -2141,7 +2141,7 @@ CURLcode Curl_http2_setup(struct connectdata *conn)
|
|||
else
|
||||
conn->handler = &Curl_handler_http2;
|
||||
|
||||
result = Curl_http2_init(conn);
|
||||
result = http2_init(conn);
|
||||
if(result) {
|
||||
Curl_add_buffer_free(&stream->header_recvbuf);
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue