summaryrefslogtreecommitdiff
path: root/networking/udhcp/dumpleases.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-10-18 11:40:26 +0200
committerDenys Vlasenko2010-10-18 11:40:26 +0200
commit9ff50b869780aba131dc9b542ccd0f1a3959e920 (patch)
treea1f65f2a5f8c3aa1d6f51bc15c734f2b3ae46ead /networking/udhcp/dumpleases.c
parentb102e12253078e8c0ebdeeb5e1893ea6a025a700 (diff)
downloadbusybox-9ff50b869780aba131dc9b542ccd0f1a3959e920.zip
busybox-9ff50b869780aba131dc9b542ccd0f1a3959e920.tar.gz
*: deinline SWAP_xE64 on 32-bit CPUs. Wins !90 bytes both on 32 and 64 bits
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'networking/udhcp/dumpleases.c')
-rw-r--r--networking/udhcp/dumpleases.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c
index 341815a..46610fc 100644
--- a/networking/udhcp/dumpleases.c
+++ b/networking/udhcp/dumpleases.c
@@ -6,17 +6,6 @@
#include "dhcpd.h"
#include "unicode.h"
-#if BB_LITTLE_ENDIAN
-static inline uint64_t hton64(uint64_t v)
-{
- return SWAP_BE64(v);
-}
-#else
-#define hton64(v) (v)
-#endif
-#define ntoh64(v) hton64(v)
-
-
int dumpleases_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dumpleases_main(int argc UNUSED_PARAM, char **argv)
{
@@ -54,7 +43,7 @@ int dumpleases_main(int argc UNUSED_PARAM, char **argv)
/* "123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 */
xread(fd, &written_at, sizeof(written_at));
- written_at = ntoh64(written_at);
+ written_at = SWAP_BE64(written_at);
curr = time(NULL);
if (curr < written_at)
written_at = curr; /* lease file from future! :) */