mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 10:50:15 +00:00
Style cleanup
This commit is contained in:
parent
15e673bc90
commit
f24a4a08da
@ -334,7 +334,7 @@ struct CTRAddrInfo {
|
||||
u32 ai_addr; //CTRSockAddr*
|
||||
u32 ai_next; //CTRAddrInfo*
|
||||
|
||||
static addrinfo ToPlatform(CTRAddrInfo const& ctr_info) {
|
||||
static addrinfo ToPlatform(const CTRAddrInfo& ctr_info) {
|
||||
addrinfo result;
|
||||
result.ai_flags = ctr_info.ai_flags;
|
||||
result.ai_family = ctr_info.ai_family;
|
||||
@ -359,7 +359,7 @@ struct CTRAddrInfo {
|
||||
return result;
|
||||
}
|
||||
|
||||
static void FreePlatform(addrinfo const& info) {
|
||||
static void FreePlatform(const addrinfo& info) {
|
||||
if(info.ai_canonname != nullptr) {
|
||||
delete info.ai_canonname;
|
||||
}
|
||||
@ -379,7 +379,7 @@ struct CTRAddrInfoBuffer {
|
||||
char ai_canonname[256];
|
||||
sockaddr_storage ai_addr;
|
||||
|
||||
static void FromAddrInfo(addrinfo const& info, CTRAddrInfoBuffer *buffer) {
|
||||
static void FromAddrInfo(const addrinfo& info, CTRAddrInfoBuffer* buffer) {
|
||||
buffer->ai_flags = info.ai_flags;
|
||||
buffer->ai_family = info.ai_family;
|
||||
buffer->ai_socktype = info.ai_socktype;
|
||||
@ -902,7 +902,6 @@ static void GetAddrInfo(Service::Interface* self) {
|
||||
CTRAddrInfo* hints = reinterpret_cast<CTRAddrInfo*>(Memory::GetPointer(cmd_buffer[10]));
|
||||
CTRAddrInfoBuffer* buffer = reinterpret_cast<CTRAddrInfoBuffer*>(Memory::GetPointer(cmd_buffer[0x104 >> 2]));
|
||||
|
||||
int ret;
|
||||
int err = 0;
|
||||
int count = 0;
|
||||
|
||||
@ -910,7 +909,7 @@ static void GetAddrInfo(Service::Interface* self) {
|
||||
addrinfo* res;
|
||||
addrinfo plat_hints = CTRAddrInfo::ToPlatform(*hints);
|
||||
|
||||
ret = ::getaddrinfo(node, service, &plat_hints, &results);
|
||||
int ret = ::getaddrinfo(node, service, &plat_hints, &results);
|
||||
|
||||
CTRAddrInfo::FreePlatform(plat_hints);
|
||||
|
||||
@ -942,11 +941,10 @@ static void GetNameInfo(Service::Interface* self) {
|
||||
char* host = reinterpret_cast<char*>(Memory::GetPointer(cmd_buffer[0x104 >> 2]));
|
||||
char* serv = reinterpret_cast<char*>(Memory::GetPointer(cmd_buffer[0x10C >> 2]));
|
||||
|
||||
int ret;
|
||||
int err = 0;
|
||||
|
||||
sockaddr addr = CTRSockAddr::ToPlatform(*tmpaddr);
|
||||
::getnameinfo(&addr, tmpaddr_len, host, hostlen, serv, servlen, flags);
|
||||
int ret = ::getnameinfo(&addr, tmpaddr_len, host, hostlen, serv, servlen, flags);
|
||||
|
||||
cmd_buffer[0] = IPC::MakeHeader(0x10, 4, 2);
|
||||
cmd_buffer[1] = ret;
|
||||
|
Loading…
Reference in New Issue
Block a user