diff options
author | Matt Kraai <kraai@debian.org> | 2001-05-16 14:21:09 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2001-05-16 14:21:09 +0000 |
commit | 59df6f73988b103f0dcfffeaec10642527336c5e (patch) | |
tree | fab28cbdabe79bb98e1cdc99f1fa2b6da599f709 /networking/hostname.c | |
parent | bc604a2f417ea290913fedb6807e390e4fc8833e (diff) | |
download | busybox-w32-59df6f73988b103f0dcfffeaec10642527336c5e.tar.gz busybox-w32-59df6f73988b103f0dcfffeaec10642527336c5e.tar.bz2 busybox-w32-59df6f73988b103f0dcfffeaec10642527336c5e.zip |
Change 'printf("%s\n", ...)' into 'puts(...)'. Noted and patched in hostname.c
by Larry Doolittle.
Diffstat (limited to 'networking/hostname.c')
-rw-r--r-- | networking/hostname.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/hostname.c b/networking/hostname.c index a6e001d54..f4118ea36 100644 --- a/networking/hostname.c +++ b/networking/hostname.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * $Id: hostname.c,v 1.26 2001/03/09 21:24:12 andersen Exp $ | 3 | * $Id: hostname.c,v 1.27 2001/05/16 14:21:09 kraai Exp $ |
4 | * Mini hostname implementation for busybox | 4 | * Mini hostname implementation for busybox |
5 | * | 5 | * |
6 | * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> | 6 | * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> |
@@ -112,19 +112,19 @@ int hostname_main(int argc, char **argv) | |||
112 | if (!s) | 112 | if (!s) |
113 | s = buf; | 113 | s = buf; |
114 | *s = 0; | 114 | *s = 0; |
115 | printf("%s\n", buf); | 115 | puts(buf); |
116 | } else if (opt_domain) { | 116 | } else if (opt_domain) { |
117 | s = strchr(buf, '.'); | 117 | s = strchr(buf, '.'); |
118 | printf("%s\n", (s ? s + 1 : "")); | 118 | puts(s ? s + 1 : ""); |
119 | } else if (opt_ip) { | 119 | } else if (opt_ip) { |
120 | h = gethostbyname(buf); | 120 | h = gethostbyname(buf); |
121 | if (!h) { | 121 | if (!h) { |
122 | printf("Host not found\n"); | 122 | printf("Host not found\n"); |
123 | exit(1); | 123 | exit(1); |
124 | } | 124 | } |
125 | printf("%s\n", inet_ntoa(*(struct in_addr *) (h->h_addr))); | 125 | puts(inet_ntoa(*(struct in_addr *) (h->h_addr))); |
126 | } else { | 126 | } else { |
127 | printf("%s\n", buf); | 127 | puts(buf); |
128 | } | 128 | } |
129 | } | 129 | } |
130 | return(0); | 130 | return(0); |