diff options
Diffstat (limited to 'networking')
-rw-r--r-- | networking/hostname.c | 5 | ||||
-rw-r--r-- | networking/wget.c | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/networking/hostname.c b/networking/hostname.c index 3dba64154..ce17ba91c 100644 --- a/networking/hostname.c +++ b/networking/hostname.c @@ -1,6 +1,6 @@ /* vi: set sw=4 ts=4: */ /* - * $Id: hostname.c,v 1.22 2001/01/31 19:00:20 kraai Exp $ + * $Id: hostname.c,v 1.23 2001/02/01 16:49:29 kraai Exp $ * Mini hostname implementation for busybox * * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> @@ -49,8 +49,7 @@ void do_sethostname(char *s, int isfile) f = xfopen(s, "r"); fgets(buf, 255, f); fclose(f); - if (buf[strlen(buf) - 1] == '\n') - buf[strlen(buf) - 1] = 0; + chomp(buf); if (sethostname(buf, strlen(buf)) < 0) perror_msg_and_die("sethostname"); } diff --git a/networking/wget.c b/networking/wget.c index 70f8d1b89..c134427e4 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -216,6 +216,7 @@ int wget_main(int argc, char **argv) /*FALLTHRU*/ default: close_and_delete_outfile(output, fname_out, do_continue); + chomp(buf); error_msg_and_die("server returned error %d: %s", atoi(s), buf); } @@ -532,7 +533,7 @@ progressmeter(int flag) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: wget.c,v 1.25 2001/01/31 19:00:21 kraai Exp $ + * $Id: wget.c,v 1.26 2001/02/01 16:49:30 kraai Exp $ */ |