Commit 94c1985b authored by Kristján Valur Jónsson's avatar Kristján Valur Jónsson Committed by michael-grunder
Browse files

Use correct type for getsockopt()

parent 5e002bc2
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment