From ecae66ac16338d8cddb55e1782ebd8c5f670ff53 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 2 Jun 2006 20:53:38 +0000 Subject: [PATCH] Header cleanup: don't #include headers that libbb.h already includes. --- networking/libiproute/ipaddress.c | 5 +---- networking/libiproute/iplink.c | 20 +++----------------- networking/libiproute/iproute.c | 5 ++--- networking/libiproute/iptunnel.c | 5 +---- networking/libiproute/libnetlink.c | 3 +-- networking/libiproute/ll_addr.c | 4 ++-- networking/libiproute/ll_map.c | 5 +---- networking/libiproute/utils.c | 5 ++--- 8 files changed, 13 insertions(+), 39 deletions(-) diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index a74250621..a048cff99 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c @@ -9,16 +9,14 @@ * Laszlo Valko 990223: address label must be zero terminated */ +#include "libbb.h" #include #include #include -#include #include #include -#include - #include #include @@ -26,7 +24,6 @@ #include "utils.h" #include "ip_common.h" -#include "libbb.h" static struct { diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index 12677d522..2797f0250 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c @@ -1,21 +1,17 @@ /* * iplink.c "ip link". * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * * Authors: Alexey Kuznetsov, * + * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ +#include "libbb.h" + #include #include -#include #include -#include #include #include @@ -23,19 +19,12 @@ #include #include -#if __GLIBC__ >=2 && __GLIBC_MINOR >= 1 #include -#else -#include -#endif #include "rt_names.h" #include "utils.h" #include "ip_common.h" -#include "libbb.h" - - /* take from linux/sockios.h */ #define SIOCSIFNAME 0x8923 /* set interface name */ @@ -96,7 +85,6 @@ static int do_chflags(char *dev, __u32 flags, __u32 mask) static int do_changename(char *dev, char *newdev) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) struct ifreq ifr; int fd; int err; @@ -114,8 +102,6 @@ static int do_changename(char *dev, char *newdev) } close(fd); return err; -#endif - return 0; } static int set_qlen(char *dev, int qlen) diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index a67bc2e44..6052a3023 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c @@ -13,9 +13,10 @@ * Kunihiro Ishiguro 001102: rtnh_ifindex was not initialized */ +#include "libbb.h" + #include -#include #include #include #include @@ -24,8 +25,6 @@ #include "utils.h" #include "ip_common.h" -#include "libbb.h" - #ifndef RTAX_RTTVAR #define RTAX_RTTVAR RTAX_HOPS #endif diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c index 23b5d5013..1b1458e1e 100644 --- a/networking/libiproute/iptunnel.c +++ b/networking/libiproute/iptunnel.c @@ -13,16 +13,14 @@ * Phil Karn 990408: "pmtudisc" flag */ +#include "libbb.h" #include #include -#include #include #include -#include #include -#include #include #include @@ -37,7 +35,6 @@ #include "utils.h" #include "ip_common.h" -#include "libbb.h" static int do_ioctl_get_ifindex(char *dev) { diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c index ad5bcd70f..93d6d67f0 100644 --- a/networking/libiproute/libnetlink.c +++ b/networking/libiproute/libnetlink.c @@ -10,10 +10,10 @@ * */ +#include "libbb.h" #include #include -#include #include #include #include @@ -21,7 +21,6 @@ #include #include "libnetlink.h" -#include "libbb.h" void rtnl_close(struct rtnl_handle *rth) { diff --git a/networking/libiproute/ll_addr.c b/networking/libiproute/ll_addr.c index c4c446463..bb89a45a8 100644 --- a/networking/libiproute/ll_addr.c +++ b/networking/libiproute/ll_addr.c @@ -9,14 +9,14 @@ * Authors: Alexey Kuznetsov, */ -#include +#include "libbb.h" + #include #include #include "rt_names.h" #include "utils.h" -#include "libbb.h" const char *ll_addr_n2a(unsigned char *addr, int alen, int type, char *buf, int blen) { diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c index 24487eb3d..0ac5ea956 100644 --- a/networking/libiproute/ll_map.c +++ b/networking/libiproute/ll_map.c @@ -10,14 +10,11 @@ * */ -#include +#include "libbb.h" #include -#include -#include #include "libnetlink.h" #include "ll_map.h" -#include "libbb.h" struct idxmap { diff --git a/networking/libiproute/utils.c b/networking/libiproute/utils.c index 984f7bed9..3a161ead0 100644 --- a/networking/libiproute/utils.c +++ b/networking/libiproute/utils.c @@ -10,13 +10,12 @@ * Rani Assaf 980929: resolve addresses */ -#include +#include "libbb.h" + #include #include -#include #include "utils.h" -#include "libbb.h" #include "inet_common.h" int get_integer(int *val, char *arg, int base)