From 1889fba1fc6bb81e3b3c1cca27840932024e726d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 19 Dec 2015 00:52:28 +0100 Subject: fix issue #8 on github MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/arpa/inet/htonl.c | 2 +- src/arpa/inet/htonll.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/arpa') 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; } -- cgit v1.2.3-70-g09d2