Sign in
fuchsia
/
fuchsia
/
83854f31e881f0f9aa2bd848a84a94e01fb09dd9
/
.
/
zircon
/
third_party
/
ulib
/
musl
/
src
/
network
/
ntohs.c
blob: 0d31447f93aed4fc57fae964e7d8aa4c20e1d315 [
file
] [
log
] [
blame
]
#include
<byteswap.h>
#include
<netinet/in.h>
uint16_t
ntohs
(
uint16_t
n
)
{
union
{
int
i
;
char
c
;
}
u
=
{
1
};
return
u
.
c
?
bswap_16
(
n
)
:
n
;
}