Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
ec18d790
Commit
ec18d790
authored
Apr 02, 2020
by
michael-grunder
Browse files
Const correctness
Fixes #778
parent
a1405e17
Changes
1
Show whitespace changes
Inline
Side-by-side
sockcompat.c
View file @
ec18d790
...
...
@@ -212,7 +212,7 @@ int win32_getsockopt(SOCKET sockfd, int level, int optname, void *optval, sockle
int
win32_setsockopt
(
SOCKET
sockfd
,
int
level
,
int
optname
,
const
void
*
optval
,
socklen_t
optlen
)
{
int
ret
=
0
;
if
((
level
==
SOL_SOCKET
)
&&
((
optname
==
SO_RCVTIMEO
)
||
(
optname
==
SO_SNDTIMEO
)))
{
struct
timeval
*
tv
=
optval
;
const
struct
timeval
*
tv
=
optval
;
DWORD
timeout
=
tv
->
tv_sec
*
1000
+
tv
->
tv_usec
/
1000
;
ret
=
setsockopt
(
sockfd
,
level
,
optname
,
(
const
char
*
)
&
timeout
,
sizeof
(
DWORD
));
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment