Skip to content

Commit f39da5e

Browse files
author
Arto Kinnunen
committed
Remove unnecessary casts from stagger/RTT API
1 parent 329c5d8 commit f39da5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

features/netsocket/InternetSocket.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ int InternetSocket::get_rtt_estimate_to_address(const SocketAddress &address, ui
127127
// Set up address
128128
memcpy(ns_api_latency_req.addr, address.get_ip_bytes(), 16);
129129

130-
ret = this->getsockopt(NSAPI_SOCKET, NSAPI_LATENCY, (void *)&ns_api_latency_req, &opt_len);
130+
ret = this->getsockopt(NSAPI_SOCKET, NSAPI_LATENCY, &ns_api_latency_req, &opt_len);
131131
if (ret == NSAPI_ERROR_OK) {
132132
// success, latency found. Convert to RTT.
133133
*rtt_estimate = ns_api_latency_req.latency * 2;
@@ -146,7 +146,7 @@ int InternetSocket::get_stagger_estimate_to_address(const SocketAddress &address
146146
memcpy(nsapi_stagger.addr, address.get_ip_bytes(), 16);
147147
nsapi_stagger.data_amount = data_amount;
148148

149-
ret = this->getsockopt(NSAPI_SOCKET, NSAPI_STAGGER, (void *)&nsapi_stagger, &opt_len);
149+
ret = this->getsockopt(NSAPI_SOCKET, NSAPI_STAGGER, &nsapi_stagger, &opt_len);
150150
if (ret == NSAPI_ERROR_OK) {
151151
// success, stagger found
152152
if (stagger_min) {

0 commit comments

Comments
 (0)