diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-09-01 12:01:17 +0200 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-09-01 12:01:17 +0200 |
commit | 0004e994934374b5695e004bbcb7b1fd67a170f2 (patch) | |
tree | 6cbf7c0042fbd265b34f28111726b0f04c536818 /libbb/inet_common.c | |
parent | 9dc04124d5a3f0c9be249287817a964691e187b0 (diff) | |
download | busybox-w32-0004e994934374b5695e004bbcb7b1fd67a170f2.tar.gz busybox-w32-0004e994934374b5695e004bbcb7b1fd67a170f2.tar.bz2 busybox-w32-0004e994934374b5695e004bbcb7b1fd67a170f2.zip |
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 'libbb/inet_common.c')
-rw-r--r-- | libbb/inet_common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libbb/inet_common.c b/libbb/inet_common.c index b47259089..e031ddf9b 100644 --- a/libbb/inet_common.c +++ b/libbb/inet_common.c | |||
@@ -23,7 +23,7 @@ int FAST_FUNC INET_resolve(const char *name, struct sockaddr_in *s_in, int hostf | |||
23 | s_in->sin_port = 0; | 23 | s_in->sin_port = 0; |
24 | 24 | ||
25 | /* Default is special, meaning 0.0.0.0. */ | 25 | /* Default is special, meaning 0.0.0.0. */ |
26 | if (!strcmp(name, bb_str_default)) { | 26 | if (strcmp(name, "default") == 0) { |
27 | s_in->sin_addr.s_addr = INADDR_ANY; | 27 | s_in->sin_addr.s_addr = INADDR_ANY; |
28 | return 1; | 28 | return 1; |
29 | } | 29 | } |
@@ -109,7 +109,7 @@ char* FAST_FUNC INET_rresolve(struct sockaddr_in *s_in, int numeric, uint32_t ne | |||
109 | if (ad == INADDR_ANY) { | 109 | if (ad == INADDR_ANY) { |
110 | if ((numeric & 0x0FFF) == 0) { | 110 | if ((numeric & 0x0FFF) == 0) { |
111 | if (numeric & 0x8000) | 111 | if (numeric & 0x8000) |
112 | return xstrdup(bb_str_default); | 112 | return xstrdup("default"); |
113 | return xstrdup("*"); | 113 | return xstrdup("*"); |
114 | } | 114 | } |
115 | } | 115 | } |
@@ -205,7 +205,7 @@ char* FAST_FUNC INET6_rresolve(struct sockaddr_in6 *sin6, int numeric) | |||
205 | } | 205 | } |
206 | if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { | 206 | if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { |
207 | if (numeric & 0x8000) | 207 | if (numeric & 0x8000) |
208 | return xstrdup(bb_str_default); | 208 | return xstrdup("default"); |
209 | return xstrdup("*"); | 209 | return xstrdup("*"); |
210 | } | 210 | } |
211 | 211 | ||