diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-08-08 16:23:03 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-08-08 19:56:14 +0200 |
commit | ca528d1de7936dccdc6749e0e89a70307df5957d (patch) | |
tree | 9c6399dcc753bbb4106aa0579d4de1b9e49118ac | |
parent | 09f1e58cfe29c647352543f73ed1713a9843dd2d (diff) | |
download | curl-ca528d1de7936dccdc6749e0e89a70307df5957d.tar.gz |
ldap: adapt to conn->port now being an 'int'
Remove typecasts. Fix printf() formats.
Follow-up from 764c6bd3bf.
Pointed out by Coverity CID 1507858.
Closes #9281
-rw-r--r-- | lib/ldap.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/ldap.c b/lib/ldap.c index 410dc72e8..b07334904 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -356,7 +356,7 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) #ifdef HAVE_LDAP_SSL #ifdef USE_WIN32_LDAP /* Win32 LDAP SDK doesn't support insecure mode without CA! */ - server = ldap_sslinit(host, (int)conn->port, 1); + server = ldap_sslinit(host, conn->port, 1); ldap_set_option(server, LDAP_OPT_SSL, LDAP_OPT_ON); #else int ldap_option; @@ -402,9 +402,9 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) result = CURLE_SSL_CERTPROBLEM; goto quit; } - server = ldapssl_init(host, (int)conn->port, 1); + server = ldapssl_init(host, conn->port, 1); if(!server) { - failf(data, "LDAP local: Cannot connect to %s:%ld", + failf(data, "LDAP local: Cannot connect to %s:%u", conn->host.dispname, conn->port); result = CURLE_COULDNT_CONNECT; goto quit; @@ -443,9 +443,9 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) result = CURLE_SSL_CERTPROBLEM; goto quit; } - server = ldap_init(host, (int)conn->port); + server = ldap_init(host, conn->port); if(!server) { - failf(data, "LDAP local: Cannot connect to %s:%ld", + failf(data, "LDAP local: Cannot connect to %s:%u", conn->host.dispname, conn->port); result = CURLE_COULDNT_CONNECT; goto quit; @@ -484,9 +484,9 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) goto quit; } else { - server = ldap_init(host, (int)conn->port); + server = ldap_init(host, conn->port); if(!server) { - failf(data, "LDAP local: Cannot connect to %s:%ld", + failf(data, "LDAP local: Cannot connect to %s:%u", conn->host.dispname, conn->port); result = CURLE_COULDNT_CONNECT; goto quit; |