projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e3a8d5
)
hostname: make -i not emit extra trailing space
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 1 Apr 2012 14:52:21 +0000
(16:52 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 1 Apr 2012 14:52:21 +0000
(16:52 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/hostname.c
patch
|
blob
|
history
diff --git
a/networking/hostname.c
b/networking/hostname.c
index 5f663908cf5524a686a09d3ecd97da0d33123d1a..d2516b5fb904c6f46e77d534dee78dd4369bdb77 100644
(file)
--- a/
networking/hostname.c
+++ b/
networking/hostname.c
@@
-153,7
+153,7
@@
int hostname_main(int argc UNUSED_PARAM, char **argv)
if (hp->h_length == sizeof(struct in_addr)) {
struct in_addr **h_addr_list = (struct in_addr **)hp->h_addr_list;
while (*h_addr_list) {
- printf(
"%s
", inet_ntoa(**h_addr_list));
+ printf(
h_addr_list[1] ? "%s " : "%s
", inet_ntoa(**h_addr_list));
h_addr_list++;
}
bb_putchar('\n');