From b102e12253078e8c0ebdeeb5e1893ea6a025a700 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 18 Oct 2010 11:39:47 +0200 Subject: *: use SWAP_BE64 instead of open-coding it Signed-off-by: Denys Vlasenko --- networking/udhcp/dumpleases.c | 2 +- networking/udhcp/files.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'networking') diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index 2eaadb6..341815a 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c @@ -9,7 +9,7 @@ #if BB_LITTLE_ENDIAN static inline uint64_t hton64(uint64_t v) { - return (((uint64_t)htonl(v)) << 32) | htonl(v >> 32); + return SWAP_BE64(v); } #else #define hton64(v) (v) diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c index f5348f6..68b2085 100644 --- a/networking/udhcp/files.c +++ b/networking/udhcp/files.c @@ -14,7 +14,7 @@ #if BB_LITTLE_ENDIAN static inline uint64_t hton64(uint64_t v) { - return (((uint64_t)htonl(v)) << 32) | htonl(v >> 32); + return SWAP_BE64(v); } #else #define hton64(v) (v) -- cgit v1.1