DEV9: Reuse variable in internal server

This commit is contained in:
TheLastRar 2021-05-11 08:32:02 +01:00 committed by refractionpcsx2
parent 635f411880
commit be9587d520
1 changed files with 4 additions and 4 deletions

View File

@ -357,10 +357,11 @@ void NetAdapter::ReloadInternalServer(ifaddrs* adapter)
bool NetAdapter::InternalServerRecv(NetPacket* pkt)
{
IP_Payload* updpkt = dhcpServer.Recv();
if (updpkt != nullptr)
IP_Payload* ippay;
ippay = dhcpServer.Recv();
if (ippay != nullptr)
{
IP_Packet* ippkt = new IP_Packet(updpkt);
IP_Packet* ippkt = new IP_Packet(ippay);
ippkt->destinationIP = {255, 255, 255, 255};
ippkt->sourceIP = internalIP;
EthernetFrame frame(ippkt);
@ -371,7 +372,6 @@ bool NetAdapter::InternalServerRecv(NetPacket* pkt)
return true;
}
IP_Payload* ippay;
ippay = dnsServer.Recv();
if (ippay != nullptr)
{