diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-12-23 23:41:13 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-12-25 23:42:16 +0100 |
commit | aba01da6390894c9e7ebb6691da544bc01b6324d (patch) | |
tree | cccdc610b043e065e479eefb53a72893d0e06e64 /lib/c-hyper.c | |
parent | 78617b48e46e5934d94c155e0b4565978341bfe6 (diff) | |
download | curl-aba01da6390894c9e7ebb6691da544bc01b6324d.tar.gz |
failf: remove newline from formatting strings
... as failf adds one itself.
Also: add an assert() to failf() that triggers on a newline in the
format string!
Closes #6365
Diffstat (limited to 'lib/c-hyper.c')
-rw-r--r-- | lib/c-hyper.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/c-hyper.c b/lib/c-hyper.c index c7995d9f1..5df2f0e19 100644 --- a/lib/c-hyper.c +++ b/lib/c-hyper.c @@ -340,7 +340,7 @@ static CURLcode hyperstream(struct Curl_easy *data, h->init = TRUE; *didwhat = KEEP_RECV; if(!resp) { - failf(data, "hyperstream: couldn't get response\n"); + failf(data, "hyperstream: couldn't get response"); return CURLE_RECV_ERROR; } @@ -356,7 +356,7 @@ static CURLcode hyperstream(struct Curl_easy *data, headers = hyper_response_headers(resp); if(!headers) { - failf(data, "hyperstream: couldn't get response headers\n"); + failf(data, "hyperstream: couldn't get response headers"); result = CURLE_RECV_ERROR; break; } @@ -369,20 +369,20 @@ static CURLcode hyperstream(struct Curl_easy *data, } if(empty_header(data)) { - failf(data, "hyperstream: couldn't pass blank header\n"); + failf(data, "hyperstream: couldn't pass blank header"); result = CURLE_OUT_OF_MEMORY; break; } resp_body = hyper_response_body(resp); if(!resp_body) { - failf(data, "hyperstream: couldn't get response body\n"); + failf(data, "hyperstream: couldn't get response body"); result = CURLE_RECV_ERROR; break; } foreach = hyper_body_foreach(resp_body, hyper_body_chunk, data); if(!foreach) { - failf(data, "hyperstream: body foreach failed\n"); + failf(data, "hyperstream: body foreach failed"); result = CURLE_OUT_OF_MEMORY; break; } @@ -467,7 +467,7 @@ CURLcode Curl_hyper_header(struct Curl_easy *data, hyper_headers *headers, if(HYPERE_OK != hyper_headers_add(headers, (uint8_t *)n, nlen, (uint8_t *)v, vlen)) { - failf(data, "hyper_headers_add host\n"); + failf(data, "hyper_headers_add host"); return CURLE_OUT_OF_MEMORY; } if(data->set.verbose) { @@ -505,7 +505,7 @@ static CURLcode request_target(struct Curl_easy *data, if(hyper_request_set_uri(req, (uint8_t *)Curl_dyn_uptr(&r), Curl_dyn_len(&r))) { - failf(data, "error setting path\n"); + failf(data, "error setting path"); result = CURLE_OUT_OF_MEMORY; } else @@ -758,7 +758,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) headers = hyper_request_headers(req); if(!headers) { - failf(data, "hyper_request_headers\n"); + failf(data, "hyper_request_headers"); goto error; } @@ -829,7 +829,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) data->req.upload_chunky = FALSE; sendtask = hyper_clientconn_send(client, req); if(!sendtask) { - failf(data, "hyper_clientconn_send\n"); + failf(data, "hyper_clientconn_send"); goto error; } |