summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/sockets/sockets_translate.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/hle/service/sockets/sockets_translate.cpp b/src/core/hle/service/sockets/sockets_translate.cpp
index 2be8f642d..139743e1d 100644
--- a/src/core/hle/service/sockets/sockets_translate.cpp
+++ b/src/core/hle/service/sockets/sockets_translate.cpp
@@ -131,21 +131,21 @@ u16 TranslatePollEventsToGuest(u16 flags) {
Network::SockAddrIn Translate(SockAddrIn value) {
ASSERT(value.len == 0 || value.len == sizeof(value));
- Network::SockAddrIn result;
- result.family = Translate(static_cast<Domain>(value.family));
- result.ip = value.ip;
- result.portno = value.portno >> 8 | value.portno << 8;
- return result;
+ return {
+ .family = Translate(static_cast<Domain>(value.family)),
+ .ip = value.ip,
+ .portno = static_cast<u16>(value.portno >> 8 | value.portno << 8),
+ };
}
SockAddrIn Translate(Network::SockAddrIn value) {
- SockAddrIn result;
- result.len = sizeof(result);
- result.family = static_cast<u8>(Translate(value.family));
- result.portno = value.portno >> 8 | value.portno << 8;
- result.ip = value.ip;
- result.zeroes = {};
- return result;
+ return {
+ .len = sizeof(SockAddrIn),
+ .family = static_cast<u8>(Translate(value.family)),
+ .portno = static_cast<u16>(value.portno >> 8 | value.portno << 8),
+ .ip = value.ip,
+ .zeroes = {},
+ };
}
Network::ShutdownHow Translate(ShutdownHow how) {