aboutsummaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2001-02-01 16:49:30 +0000
committerMatt Kraai <kraai@debian.org>2001-02-01 16:49:30 +0000
commit05e782ddd3dc58245c889529bb8aeeaddf24bf71 (patch)
tree8fbb91ca75358923724889a558c954cffdf10136 /utility.c
parentbd018b1babf0521b8e740abb6473133c1c4c35d2 (diff)
downloadbusybox-w32-05e782ddd3dc58245c889529bb8aeeaddf24bf71.tar.gz
busybox-w32-05e782ddd3dc58245c889529bb8aeeaddf24bf71.tar.bz2
busybox-w32-05e782ddd3dc58245c889529bb8aeeaddf24bf71.zip
Fix wget error message and add (and use) chomp library function.
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/utility.c b/utility.c
index 311926938..0a0e652af 100644
--- a/utility.c
+++ b/utility.c
@@ -1760,6 +1760,19 @@ char *format(unsigned long val, unsigned long hr)
1760} 1760}
1761#endif 1761#endif
1762 1762
1763#if defined(BB_GREP) || defined(BB_HOSTNAME) || defined(BB_SED) || defined(BB_TAR) || defined(BB_WGET) || defined(BB_XARGS)
1764void chomp(char *s)
1765{
1766 size_t len = strlen(s);
1767
1768 if (len == 0)
1769 return;
1770
1771 if (s[len-1] == '\n')
1772 s[len-1] = '\0';
1773}
1774#endif
1775
1763/* END CODE */ 1776/* END CODE */
1764/* 1777/*
1765Local Variables: 1778Local Variables: