DEV9: Shuffle code in Linux GetAdapter

Giving same flow as Windows code
This commit is contained in:
TheLastRar 2024-05-23 11:08:24 +01:00 committed by refractionpcsx2
parent 3acf898680
commit 0856f3b223
1 changed files with 5 additions and 8 deletions

View File

@ -204,18 +204,15 @@ bool AdapterUtils::GetAdapter(const std::string& name, Adapter* adapter, Adapter
if (pAdapter->ifa_addr != nullptr &&
ReadAddressFamily(pAdapter->ifa_addr) == AF_INET &&
strcmp(pAdapter->ifa_name, name.c_str()) == 0)
break;
{
*adapter = *pAdapter;
buffer->swap(adapterInfo);
return true;
}
pAdapter = pAdapter->ifa_next;
} while (pAdapter);
if (pAdapter != nullptr)
{
*adapter = *pAdapter;
buffer->swap(adapterInfo);
return true;
}
return false;
}
bool AdapterUtils::GetAdapterAuto(Adapter* adapter, AdapterBuffer* buffer)