From 69c699cc77a457820836d87ca57e53c67efe6a8a Mon Sep 17 00:00:00 2001 From: kraai Date: Thu, 1 Feb 2001 16:49:30 +0000 Subject: Fix wget error message and add (and use) chomp library function. git-svn-id: svn://busybox.net/trunk/busybox@1734 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- tar.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tar.c') diff --git a/tar.c b/tar.c index 60744e8db..fb0fcc614 100644 --- a/tar.c +++ b/tar.c @@ -274,8 +274,7 @@ extern int tar_main(int argc, char **argv) while (fgets(file, sizeof(file), fileList) != NULL) { excludeList = xrealloc(excludeList, sizeof(char *) * (excludeListSize+2)); - if (file[strlen(file)-1] == '\n') - file[strlen(file)-1] = '\0'; + chomp(file); excludeList[excludeListSize] = xstrdup(file); /* Tack a NULL onto the end of the list */ excludeList[++excludeListSize] = NULL; -- cgit v1.2.3-55-g6feb