Skip to content

Commit 564ac8f

Browse files
authored
refactor: fix reinterpret_cast usage in setsockopt call
1 parent f2d7a99 commit 564ac8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/time_shield/ntp_client/udp_transport_posix.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace detail {
4949
timeval tv;
5050
tv.tv_sec = timeout_ms / 1000;
5151
tv.tv_usec = (timeout_ms % 1000) * 1000;
52-
::setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, reinterpret_cast<char*>(&tv), sizeof(tv));
52+
::setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
5353

5454
const ssize_t sent = ::sendto(sock,
5555
req.send_data,

0 commit comments

Comments
 (0)