summaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
authorKristján Valur Jónsson <sweskman@gmail.com>2021-04-08 10:03:22 +0000
committermichael-grunder <michael.grunder@gmail.com>2022-06-26 13:19:40 -0700
commit94c1985bde0751fabc31deba437ffa6f6d52b696 (patch)
tree82677168fd16448e8bfa5bd68ad82f6ec29eeb6f /net.c
parent5e002bc21c6b7483592cd66417bf7a374590b973 (diff)
Use correct type for getsockopt()
Diffstat (limited to 'net.c')
-rw-r--r--net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net.c b/net.c
index d9e6d7a..d252555 100644
--- a/net.c
+++ b/net.c
@@ -281,8 +281,8 @@ int redisCheckConnectDone(redisContext *c, int *completed) {
if (error == EINPROGRESS)
{
/* must check error to see if connect failed. Get the socket error */
- int fail, so_error, optlen;
- optlen = sizeof(so_error);
+ int fail, so_error;
+ socklen_t optlen = sizeof(so_error);
fail = getsockopt(c->fd, SOL_SOCKET, SO_ERROR, &so_error, &optlen);
if (fail == 0) {
if (so_error == 0) {