diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-04-01 16:52:21 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-04-01 16:52:21 +0200 |
commit | 1d9e99b399e72763045a2428e04b32278538ccc7 (patch) | |
tree | 964f31687e13427dc15291bdbf161c70ae8a84dc | |
parent | 3e3a8d50b3d9190c7b06787cb7639b53644e66c7 (diff) | |
download | busybox-w32-1d9e99b399e72763045a2428e04b32278538ccc7.tar.gz busybox-w32-1d9e99b399e72763045a2428e04b32278538ccc7.tar.bz2 busybox-w32-1d9e99b399e72763045a2428e04b32278538ccc7.zip |
hostname: make -i not emit extra trailing space
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/hostname.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/hostname.c b/networking/hostname.c index 5f663908c..d2516b5fb 100644 --- a/networking/hostname.c +++ b/networking/hostname.c | |||
@@ -153,7 +153,7 @@ int hostname_main(int argc UNUSED_PARAM, char **argv) | |||
153 | if (hp->h_length == sizeof(struct in_addr)) { | 153 | if (hp->h_length == sizeof(struct in_addr)) { |
154 | struct in_addr **h_addr_list = (struct in_addr **)hp->h_addr_list; | 154 | struct in_addr **h_addr_list = (struct in_addr **)hp->h_addr_list; |
155 | while (*h_addr_list) { | 155 | while (*h_addr_list) { |
156 | printf("%s ", inet_ntoa(**h_addr_list)); | 156 | printf(h_addr_list[1] ? "%s " : "%s", inet_ntoa(**h_addr_list)); |
157 | h_addr_list++; | 157 | h_addr_list++; |
158 | } | 158 | } |
159 | bb_putchar('\n'); | 159 | bb_putchar('\n'); |