diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-01-29 23:43:52 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-01-29 23:43:52 +0000 |
commit | 322661d025626d7a92482fec232d29f4450dd4b0 (patch) | |
tree | 66dcf2c776adea8556d2ebac5e3f7d8a27f05074 /networking | |
parent | 89ef65f02463b27313ff0eba806aa6e4aec10716 (diff) | |
download | busybox-w32-322661d025626d7a92482fec232d29f4450dd4b0.tar.gz busybox-w32-322661d025626d7a92482fec232d29f4450dd4b0.tar.bz2 busybox-w32-322661d025626d7a92482fec232d29f4450dd4b0.zip |
preparatory patch for -Wwrite-strings #6
Diffstat (limited to 'networking')
-rw-r--r-- | networking/interface.c | 16 | ||||
-rw-r--r-- | networking/libiproute/ll_proto.c | 2 | ||||
-rw-r--r-- | networking/libiproute/rtm_map.c | 3 | ||||
-rw-r--r-- | networking/libiproute/rtm_map.h | 2 |
4 files changed, 6 insertions, 17 deletions
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 @@ | |||
31 | * (default AF was wrong) | 31 | * (default AF was wrong) |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include "inet_common.h" | ||
35 | #include <stdio.h> | ||
36 | #include <errno.h> | ||
37 | #include <stdlib.h> | ||
38 | #include <string.h> | ||
39 | #include <unistd.h> | ||
40 | #include <fcntl.h> | ||
41 | #include <ctype.h> | ||
42 | #include <sys/ioctl.h> | ||
43 | #include <sys/types.h> | ||
44 | #include <net/if.h> | 34 | #include <net/if.h> |
45 | #include <net/if_arp.h> | 35 | #include <net/if_arp.h> |
36 | #include "inet_common.h" | ||
46 | #include "busybox.h" | 37 | #include "busybox.h" |
47 | 38 | ||
48 | #ifdef CONFIG_FEATURE_IPV6 | 39 | #ifdef CONFIG_FEATURE_IPV6 |
@@ -178,8 +169,7 @@ static char *INET6_sprint(struct sockaddr *sap, int numeric) | |||
178 | 169 | ||
179 | if (sap->sa_family == 0xFFFF || sap->sa_family == 0) | 170 | if (sap->sa_family == 0xFFFF || sap->sa_family == 0) |
180 | return safe_strncpy(buff, "[NONE SET]", sizeof(buff)); | 171 | return safe_strncpy(buff, "[NONE SET]", sizeof(buff)); |
181 | if (INET6_rresolve | 172 | if (INET6_rresolve(buff, sizeof(buff), (struct sockaddr_in6 *) sap, numeric)) |
182 | (buff, sizeof(buff), (struct sockaddr_in6 *) sap, numeric) != 0) | ||
183 | return safe_strncpy(buff, "[UNKNOWN]", sizeof(buff)); | 173 | return safe_strncpy(buff, "[UNKNOWN]", sizeof(buff)); |
184 | return buff; | 174 | return buff; |
185 | } | 175 | } |
@@ -771,7 +761,7 @@ static int if_fetch(struct interface *ife) | |||
771 | static int do_if_fetch(struct interface *ife) | 761 | static int do_if_fetch(struct interface *ife) |
772 | { | 762 | { |
773 | if (if_fetch(ife) < 0) { | 763 | if (if_fetch(ife) < 0) { |
774 | char *errmsg; | 764 | const char *errmsg; |
775 | 765 | ||
776 | if (errno == ENODEV) { | 766 | if (errno == ENODEV) { |
777 | /* Give better error message for this case. */ | 767 | /* 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 @@ | |||
24 | #define __PF(f,n) { ETH_P_##f, #n }, | 24 | #define __PF(f,n) { ETH_P_##f, #n }, |
25 | static struct { | 25 | static struct { |
26 | int id; | 26 | int id; |
27 | char *name; | 27 | const char *name; |
28 | } llproto_names[] = { | 28 | } llproto_names[] = { |
29 | __PF(LOOP,loop) | 29 | __PF(LOOP,loop) |
30 | __PF(PUP,pup) | 30 | __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 @@ | |||
13 | 13 | ||
14 | #include <stdlib.h> | 14 | #include <stdlib.h> |
15 | #include <string.h> | 15 | #include <string.h> |
16 | |||
17 | #include "rt_names.h" | 16 | #include "rt_names.h" |
18 | #include "utils.h" | 17 | #include "utils.h" |
19 | 18 | ||
20 | char *rtnl_rtntype_n2a(int id, char *buf, int len) | 19 | const char *rtnl_rtntype_n2a(int id, char *buf, int len) |
21 | { | 20 | { |
22 | switch (id) { | 21 | switch (id) { |
23 | case RTN_UNSPEC: | 22 | 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 @@ | |||
2 | #ifndef __RTM_MAP_H__ | 2 | #ifndef __RTM_MAP_H__ |
3 | #define __RTM_MAP_H__ 1 | 3 | #define __RTM_MAP_H__ 1 |
4 | 4 | ||
5 | char *rtnl_rtntype_n2a(int id, char *buf, int len); | 5 | const char *rtnl_rtntype_n2a(int id, char *buf, int len); |
6 | int rtnl_rtntype_a2n(int *id, char *arg); | 6 | int rtnl_rtntype_a2n(int *id, char *arg); |
7 | 7 | ||
8 | int get_rt_realms(uint32_t *realms, char *arg); | 8 | int get_rt_realms(uint32_t *realms, char *arg); |