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/error-header | 1 - src/headers/ip46-header | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src/headers') diff --git a/src/headers/error-header b/src/headers/error-header index 435a64b..f9913e5 100644 --- a/src/headers/error-header +++ b/src/headers/error-header @@ -3,7 +3,6 @@ #ifndef ERROR_H #define ERROR_H -#include #include extern int error_temp (int) gccattr_const ; 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