lib: msnprintf tidy-ups
doh: avoid an msnprintf() openssl: skip a superfluous return code check Closes #15434
This commit is contained in:
parent
cb011ac096
commit
080973dcdb
@ -847,11 +847,9 @@ static void doh_show(struct Curl_easy *data,
|
|||||||
}
|
}
|
||||||
else if(a->type == DNS_TYPE_AAAA) {
|
else if(a->type == DNS_TYPE_AAAA) {
|
||||||
int j;
|
int j;
|
||||||
char buffer[128];
|
char buffer[128] = "[DoH] AAAA: ";
|
||||||
char *ptr;
|
size_t len = strlen(buffer);
|
||||||
size_t len;
|
char *ptr = &buffer[len];
|
||||||
len = msnprintf(buffer, 128, "[DoH] AAAA: ");
|
|
||||||
ptr = &buffer[len];
|
|
||||||
len = sizeof(buffer) - len;
|
len = sizeof(buffer) - len;
|
||||||
for(j = 0; j < 16; j += 2) {
|
for(j = 0; j < 16; j += 2) {
|
||||||
size_t l;
|
size_t l;
|
||||||
|
|||||||
@ -2683,10 +2683,8 @@ static void ossl_trace(int direction, int ssl_ver, int content_type,
|
|||||||
"%s (%s), %s, %s (%d):\n",
|
"%s (%s), %s, %s (%d):\n",
|
||||||
verstr, direction ? "OUT" : "IN",
|
verstr, direction ? "OUT" : "IN",
|
||||||
tls_rt_name, msg_name, msg_type);
|
tls_rt_name, msg_name, msg_type);
|
||||||
if(0 <= txt_len && (unsigned)txt_len < sizeof(ssl_buf)) {
|
|
||||||
Curl_debug(data, CURLINFO_TEXT, ssl_buf, (size_t)txt_len);
|
Curl_debug(data, CURLINFO_TEXT, ssl_buf, (size_t)txt_len);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Curl_debug(data, (direction == 1) ? CURLINFO_SSL_DATA_OUT :
|
Curl_debug(data, (direction == 1) ? CURLINFO_SSL_DATA_OUT :
|
||||||
CURLINFO_SSL_DATA_IN, (char *)buf, len);
|
CURLINFO_SSL_DATA_IN, (char *)buf, len);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user