From 39fcb5a7502ffb35a90b9539478c5b0d314c3b8e Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Wed, 2 Jan 2002 19:01:41 +0000 Subject: * archival/dpkg.c (create_list): Use chomp. * archival/tar.c (append_file_list_to_list): Likewise. --- archival/tar.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'archival/tar.c') 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 { FILE *src_stream; char *line; - char *line_ptr; src_stream = xfopen(filename, "r"); while ((line = get_line_from_file(src_stream)) != NULL) { - line_ptr = last_char_is(line, '\n'); - if (line_ptr) { - *line_ptr = '\0'; - } + chomp (line); append_file_to_list(line, name_list, num_of_entries); free(line); } -- cgit v1.2.3