Skip to content

Commit 746881d

Browse files
committed
ktlint
1 parent df89e93 commit 746881d

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/net/HostResolverTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ class HostResolverTest {
8787
resolver.purgeCache(null)
8888
resolver.purgeCache(dummyAddr)
8989
}
90-
}
90+
}

runtime/runtime-core/native/src/aws/smithy/kotlin/runtime/net/HostResolverNative.kt

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import platform.posix.*
1010
internal actual object DefaultHostResolver : HostResolver {
1111
actual override suspend fun resolve(hostname: String): List<HostAddress> = memScoped {
1212
val hints = alloc<addrinfo>().apply {
13-
ai_family = AF_UNSPEC // Allow both IPv4 and IPv6
13+
ai_family = AF_UNSPEC // Allow both IPv4 and IPv6
1414
ai_socktype = SOCK_STREAM // TCP stream sockets
15-
ai_flags = AI_PASSIVE // For wildcard IP address
15+
ai_flags = AI_PASSIVE // For wildcard IP address
1616
}
1717

1818
val result = allocPointerTo<addrinfo>()
@@ -36,19 +36,23 @@ internal actual object DefaultHostResolver : HostResolver {
3636
val ipBytes = ByteArray(4)
3737
memcpy(ipBytes.refTo(0), addr.sin_addr.ptr, 4uL)
3838

39-
addresses.add(HostAddress(
40-
hostname = hostname,
41-
address = IpV4Addr(ipBytes)
42-
))
39+
addresses.add(
40+
HostAddress(
41+
hostname = hostname,
42+
address = IpV4Addr(ipBytes),
43+
),
44+
)
4345
}
4446
AF_INET6 -> {
4547
val addr = sockaddr.reinterpret<sockaddr_in6>()
4648
val ipBytes = ByteArray(16)
4749
memcpy(ipBytes.refTo(0), addr.sin6_addr.ptr, 16.convert())
48-
addresses.add(HostAddress(
49-
hostname = hostname,
50-
address = IpV6Addr(ipBytes)
51-
))
50+
addresses.add(
51+
HostAddress(
52+
hostname = hostname,
53+
address = IpV6Addr(ipBytes),
54+
),
55+
)
5256
}
5357
}
5458
current = current.pointed.ai_next
@@ -67,4 +71,4 @@ internal actual object DefaultHostResolver : HostResolver {
6771
actual override fun purgeCache(addr: HostAddress?) {
6872
// No-op, same as JVM implementation
6973
}
70-
}
74+
}

0 commit comments

Comments
 (0)