aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2019-10-13 11:13:34 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2019-10-13 22:09:59 +0200
commitbe16d8d9942afd23d9cad1fc5e80b0e90535cfff (patch)
tree50932d988bfb4b94cb9864950fee942c2291d825 /lib
parent07e987840c5bb6c33fd19a0e30dcb6f50a630a4f (diff)
connect: silence sign-compare warning
With MinGW-w64 using WinSock, `curl_socklen_t` is signed, while the result of `sizeof` is unsigned. Closes https://github.com/curl/curl/pull/4483
Diffstat (limited to 'lib')
-rw-r--r--lib/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connect.c b/lib/connect.c
index bb2275e4d..4c8c956a4 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -665,7 +665,7 @@ bool Curl_addr2string(struct sockaddr *sa, curl_socklen_t salen,
#endif
#if defined(HAVE_SYS_UN_H) && defined(AF_UNIX)
case AF_UNIX:
- if(salen > sizeof(sa_family_t)) {
+ if(salen > (curl_socklen_t)sizeof(sa_family_t)) {
su = (struct sockaddr_un*)sa;
msnprintf(addr, MAX_IPADR_LEN, "%s", su->sun_path);
}