aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-19 00:52:28 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-19 00:52:28 +0100
commit1889fba1fc6bb81e3b3c1cca27840932024e726d (patch)
tree1c93219991ae1fabb37ab0a7f1d55afe62ecbc7c
parentfix issue #7 on github, again (diff)
downloadslibc-1889fba1fc6bb81e3b3c1cca27840932024e726d.tar.gz
slibc-1889fba1fc6bb81e3b3c1cca27840932024e726d.tar.bz2
slibc-1889fba1fc6bb81e3b3c1cca27840932024e726d.tar.xz
fix issue #8 on github
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r--src/arpa/inet/htonl.c2
-rw-r--r--src/arpa/inet/htonll.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/arpa/inet/htonl.c b/src/arpa/inet/htonl.c
index 4a410b3..7d998d4 100644
--- a/src/arpa/inet/htonl.c
+++ b/src/arpa/inet/htonl.c
@@ -36,6 +36,6 @@ uint32_t _htonl(uint32_t value)
rc[1] = (value >> 16) & 255;
rc[2] = (value >> 8) & 255;
rc[3] = (value >> 0) & 255;
- return *(uint16_t*)rc;
+ return *(uint32_t*)rc;
}
diff --git a/src/arpa/inet/htonll.c b/src/arpa/inet/htonll.c
index fdd8b06..230d47b 100644
--- a/src/arpa/inet/htonll.c
+++ b/src/arpa/inet/htonll.c
@@ -42,6 +42,6 @@ uint64_t _htonll(uint64_t value)
rc[5] = (value >> 16) & 255;
rc[6] = (value >> 8) & 255;
rc[7] = (value >> 0) & 255;
- return *(uint16_t*)rc;
+ return *(uint64_t*)rc;
}