diff options
author | Matt Kraai <kraai@debian.org> | 2002-01-02 19:01:41 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2002-01-02 19:01:41 +0000 |
commit | 39fcb5a7502ffb35a90b9539478c5b0d314c3b8e (patch) | |
tree | 0338510114df960f2fa2f63a33cba5050c97d3b6 /archival/tar.c | |
parent | 0733e840bd1f94eee6a07f2a1986e29c9ddfe20c (diff) | |
download | busybox-w32-39fcb5a7502ffb35a90b9539478c5b0d314c3b8e.tar.gz busybox-w32-39fcb5a7502ffb35a90b9539478c5b0d314c3b8e.tar.bz2 busybox-w32-39fcb5a7502ffb35a90b9539478c5b0d314c3b8e.zip |
* archival/dpkg.c (create_list): Use chomp.
* archival/tar.c (append_file_list_to_list): Likewise.
Diffstat (limited to 'archival/tar.c')
-rw-r--r-- | archival/tar.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/archival/tar.c b/archival/tar.c index 22cbf3ab2..19c84a770 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -516,14 +516,10 @@ void append_file_list_to_list(char *filename, char ***name_list, int *num_of_ent | |||
516 | { | 516 | { |
517 | FILE *src_stream; | 517 | FILE *src_stream; |
518 | char *line; | 518 | char *line; |
519 | char *line_ptr; | ||
520 | 519 | ||
521 | src_stream = xfopen(filename, "r"); | 520 | src_stream = xfopen(filename, "r"); |
522 | while ((line = get_line_from_file(src_stream)) != NULL) { | 521 | while ((line = get_line_from_file(src_stream)) != NULL) { |
523 | line_ptr = last_char_is(line, '\n'); | 522 | chomp (line); |
524 | if (line_ptr) { | ||
525 | *line_ptr = '\0'; | ||
526 | } | ||
527 | append_file_to_list(line, name_list, num_of_entries); | 523 | append_file_to_list(line, name_list, num_of_entries); |
528 | free(line); | 524 | free(line); |
529 | } | 525 | } |