aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-09-01 12:01:17 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-09-01 12:01:17 +0200
commit0004e994934374b5695e004bbcb7b1fd67a170f2 (patch)
tree6cbf7c0042fbd265b34f28111726b0f04c536818 /networking
parent9dc04124d5a3f0c9be249287817a964691e187b0 (diff)
downloadbusybox-0004e994934374b5695e004bbcb7b1fd67a170f2.tar.gz
better shared strings trick
text data bss dec hex filename 861980 441 7540 869961 d4649 busybox_old 861914 441 7540 869895 d4607 busybox_unstripped Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/ifconfig.c2
-rw-r--r--networking/libiproute/utils.c4
-rw-r--r--networking/route.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index 853910f67..da2635ce0 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -370,7 +370,7 @@ int ifconfig_main(int argc UNUSED_PARAM, char **argv)
#endif
sai.sin_family = AF_INET;
sai.sin_port = 0;
- if (!strcmp(host, bb_str_default)) {
+ if (strcmp(host, "default") == 0) {
/* Default is special, meaning 0.0.0.0. */
sai.sin_addr.s_addr = INADDR_ANY;
}
diff --git a/networking/libiproute/utils.c b/networking/libiproute/utils.c
index 5125617c7..2b646f0ea 100644
--- a/networking/libiproute/utils.c
+++ b/networking/libiproute/utils.c
@@ -64,7 +64,7 @@ int get_addr_1(inet_prefix *addr, char *name, int family)
{
memset(addr, 0, sizeof(*addr));
- if (strcmp(name, bb_str_default) == 0
+ if (strcmp(name, "default") == 0
|| strcmp(name, "all") == 0
|| strcmp(name, "any") == 0
) {
@@ -103,7 +103,7 @@ static int get_prefix_1(inet_prefix *dst, char *arg, int family)
memset(dst, 0, sizeof(*dst));
- if (strcmp(arg, bb_str_default) == 0
+ if (strcmp(arg, "default") == 0
|| strcmp(arg, "all") == 0
|| strcmp(arg, "any") == 0
) {
diff --git a/networking/route.c b/networking/route.c
index c72e9457f..98567aaee 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -185,7 +185,7 @@ static NOINLINE void INET_setroute(int action, char **args)
#endif
} else {
/* Default netmask. */
- netmask = bb_str_default;
+ netmask = "default";
}
/* Prefer hostname lookup is -host flag (xflag==1) was given. */
isnet = INET_resolve(target, (struct sockaddr_in *) &rt.rt_dst,
@@ -346,7 +346,7 @@ static NOINLINE void INET6_setroute(int action, char **args)
/* We know args isn't NULL from the check in route_main. */
const char *target = *args++;
- if (strcmp(target, bb_str_default) == 0) {
+ if (strcmp(target, "default") == 0) {
prefix_len = 0;
memset(&sa6, 0, sizeof(sa6));
} else {