diff options
author | Kristján Valur Jónsson <sweskman@gmail.com> | 2021-04-08 10:03:22 +0000 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2022-06-26 13:19:40 -0700 |
commit | 94c1985bde0751fabc31deba437ffa6f6d52b696 (patch) | |
tree | 82677168fd16448e8bfa5bd68ad82f6ec29eeb6f /net.c | |
parent | 5e002bc21c6b7483592cd66417bf7a374590b973 (diff) |
Use correct type for getsockopt()
Diffstat (limited to 'net.c')
-rw-r--r-- | net.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) { |