[BusyBox] save 22 binary bytes
Larry Doolittle
ldoolitt at recycle.lbl.gov
Tue May 15 15:04:59 UTC 2001
--- /home/ldoolitt/cvs/busybox/hostname.c Fri Mar 9 14:09:18 2001
+++ hostname.c Tue May 15 13:52:20 2001
@@ -112,19 +112,19 @@
if (!s)
s = buf;
*s = 0;
- printf("%s\n", buf);
+ puts(buf);
} else if (opt_domain) {
s = strchr(buf, '.');
- printf("%s\n", (s ? s + 1 : ""));
+ puts((s ? s + 1 : ""));
} else if (opt_ip) {
h = gethostbyname(buf);
if (!h) {
- printf("Host not found\n");
+ puts("Host not found");
exit(1);
}
- printf("%s\n", inet_ntoa(*(struct in_addr *) (h->h_addr)));
+ puts(inet_ntoa(*(struct in_addr *) (h->h_addr)));
} else {
- printf("%s\n", buf);
+ puts(buf);
}
}
return(0);
More information about the busybox
mailing list