From 322661d025626d7a92482fec232d29f4450dd4b0 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 29 Jan 2007 23:43:52 +0000 Subject: preparatory patch for -Wwrite-strings #6 --- networking/interface.c | 16 +++------------- networking/libiproute/ll_proto.c | 2 +- networking/libiproute/rtm_map.c | 3 +-- networking/libiproute/rtm_map.h | 2 +- 4 files changed, 6 insertions(+), 17 deletions(-) (limited to 'networking') diff --git a/networking/interface.c b/networking/interface.c index fbcf50152..f345cb09d 100644 --- a/networking/interface.c +++ b/networking/interface.c @@ -31,18 +31,9 @@ * (default AF was wrong) */ -#include "inet_common.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include +#include "inet_common.h" #include "busybox.h" #ifdef CONFIG_FEATURE_IPV6 @@ -178,8 +169,7 @@ static char *INET6_sprint(struct sockaddr *sap, int numeric) if (sap->sa_family == 0xFFFF || sap->sa_family == 0) return safe_strncpy(buff, "[NONE SET]", sizeof(buff)); - if (INET6_rresolve - (buff, sizeof(buff), (struct sockaddr_in6 *) sap, numeric) != 0) + if (INET6_rresolve(buff, sizeof(buff), (struct sockaddr_in6 *) sap, numeric)) return safe_strncpy(buff, "[UNKNOWN]", sizeof(buff)); return buff; } @@ -771,7 +761,7 @@ static int if_fetch(struct interface *ife) static int do_if_fetch(struct interface *ife) { if (if_fetch(ife) < 0) { - char *errmsg; + const char *errmsg; if (errno == ENODEV) { /* Give better error message for this case. */ diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c index 20f26ca3f..aad460b5f 100644 --- a/networking/libiproute/ll_proto.c +++ b/networking/libiproute/ll_proto.c @@ -24,7 +24,7 @@ #define __PF(f,n) { ETH_P_##f, #n }, static struct { int id; - char *name; + const char *name; } llproto_names[] = { __PF(LOOP,loop) __PF(PUP,pup) diff --git a/networking/libiproute/rtm_map.c b/networking/libiproute/rtm_map.c index 7eb4c7122..c16406b8b 100644 --- a/networking/libiproute/rtm_map.c +++ b/networking/libiproute/rtm_map.c @@ -13,11 +13,10 @@ #include #include - #include "rt_names.h" #include "utils.h" -char *rtnl_rtntype_n2a(int id, char *buf, int len) +const char *rtnl_rtntype_n2a(int id, char *buf, int len) { switch (id) { case RTN_UNSPEC: diff --git a/networking/libiproute/rtm_map.h b/networking/libiproute/rtm_map.h index b9c8c503f..cbbcc214d 100644 --- a/networking/libiproute/rtm_map.h +++ b/networking/libiproute/rtm_map.h @@ -2,7 +2,7 @@ #ifndef __RTM_MAP_H__ #define __RTM_MAP_H__ 1 -char *rtnl_rtntype_n2a(int id, char *buf, int len); +const char *rtnl_rtntype_n2a(int id, char *buf, int len); int rtnl_rtntype_a2n(int *id, char *arg); int get_rt_realms(uint32_t *realms, char *arg); -- cgit v1.2.3