From 33dfbbeaec4a49e110f51f5d088015f1a8fb9075 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 13 Mar 2017 22:43:45 +0000 Subject: More superflous headers cleanup and tiny fixes --- src/headers/ip46-header | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/headers/ip46-header') diff --git a/src/headers/ip46-header b/src/headers/ip46-header index 91d0c86..3f872be 100644 --- a/src/headers/ip46-header +++ b/src/headers/ip46-header @@ -3,12 +3,10 @@ #ifndef IP46_H #define IP46_H -#include +#include #include #include -#include #include -#include #include #define IP46_FMT IP6_FMT @@ -30,6 +28,6 @@ struct ip46full_s #define ip46full_fmt(s, i) ((i)->is6 ? ip6_fmt(s, (i)->ip) : ip4_fmt(s, (i)->ip)) extern size_t ip46full_scan (char const *, ip46full_t *) ; extern size_t ip46full_scanlist (ip46full_t *, size_t, char const *, size_t *) ; -#define ip46full_from_ip4(i, ip4) (byte_copy((i)->ip, 4, ip4), byte_zero((i)->ip + 4, 12), (i)->is6 = 0) -#define ip46full_from_ip6(i, ip6) (byte_copy((i)->ip, 16, ip6), (i)->is6 = 1) +#define ip46full_from_ip4(i, ip4) (memcpy((i)->ip, ip4, 4), memset((i)->ip + 4, 0, 12), (i)->is6 = 0) +#define ip46full_from_ip6(i, ip6) (memcpy((i)->ip, ip6, 16), (i)->is6 = 1) -- cgit v1.2.3