← Commit list

1d9e99b39

Denys Vlasenko
Denys Vlasenko
2012-04-01
FAILED Duration: 196s

Subject

hostname: make -i not emit extra trailing space

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/hostname.c+1 -1
@@ -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');