NetBSD: misc const additions

This commit is contained in:
Christian Göttsche 2021-08-30 19:28:56 +02:00 committed by BenBE
parent 343c2e58be
commit 3834f2a68f
1 changed files with 2 additions and 2 deletions

View File

@ -390,7 +390,7 @@ bool Platform_getNetworkIO(NetworkIOData* data) {
if (getifaddrs(&ifaddrs) != 0) if (getifaddrs(&ifaddrs) != 0)
return false; return false;
for (struct ifaddrs* ifa = ifaddrs; ifa; ifa = ifa->ifa_next) { for (const struct ifaddrs* ifa = ifaddrs; ifa; ifa = ifa->ifa_next) {
if (!ifa->ifa_addr) if (!ifa->ifa_addr)
continue; continue;
if (ifa->ifa_addr->sa_family != AF_LINK) if (ifa->ifa_addr->sa_family != AF_LINK)
@ -398,7 +398,7 @@ bool Platform_getNetworkIO(NetworkIOData* data) {
if (ifa->ifa_flags & IFF_LOOPBACK) if (ifa->ifa_flags & IFF_LOOPBACK)
continue; continue;
struct if_data* ifd = (struct if_data *)ifa->ifa_data; const struct if_data* ifd = (const struct if_data *)ifa->ifa_data;
data->bytesReceived += ifd->ifi_ibytes; data->bytesReceived += ifd->ifi_ibytes;
data->packetsReceived += ifd->ifi_ipackets; data->packetsReceived += ifd->ifi_ipackets;