summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {