Cleanup: remove write-only variable "hostname" in NetworkGameList

This commit is contained in:
Patric Stout
2021-04-29 12:01:54 +02:00
committed by Patric Stout
parent 0b460bf4a1
commit a8afbe74bf
3 changed files with 0 additions and 7 deletions

View File

@@ -92,7 +92,6 @@ static void DoNetworkUDPQueryServer(NetworkAddress &address, bool needs_mutex, b
/* Clear item in gamelist */
NetworkGameList *item = CallocT<NetworkGameList>(1);
address.GetAddressAsString(item->info.server_name, lastof(item->info.server_name));
strecpy(item->info.hostname, address.GetHostname(), lastof(item->info.hostname));
item->address = address;
item->manually = manually;
NetworkGameListAddItemDelayed(item);
@@ -365,10 +364,6 @@ void ClientNetworkUDPSocketHandler::Receive_SERVER_RESPONSE(Packet *p, NetworkAd
}
}
if (item->info.hostname[0] == '\0') {
seprintf(item->info.hostname, lastof(item->info.hostname), "%s", client_addr->GetHostname());
}
if (client_addr->GetAddress()->ss_family == AF_INET6) {
strecat(item->info.server_name, " (IPv6)", lastof(item->info.server_name));
}