* archival/dpkg.c (create_list): Use chomp.
* archival/tar.c (append_file_list_to_list): Likewise.
diff --git a/archival/dpkg.c b/archival/dpkg.c
index f41363d..6dee43f 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -1034,7 +1034,6 @@
 	FILE *list_stream;
 	char **file_list = xmalloc(sizeof(char *));
 	char *line = NULL;
-	char *last_char;
 	int length = 0;
 	int count = 0;
 
@@ -1047,10 +1046,7 @@
 	while (getline(&line, &length, list_stream) != -1) {
 		/* +2 as we need to include space for the terminating NULL pointer */
 		file_list = xrealloc(file_list, sizeof(char *) * (length + 2));
-		last_char = last_char_is(line, '\n');
-		if (last_char) {
-			*last_char = '\0';
-		}
+		chomp(line);
 		file_list[count] = xstrdup(line);
 		count++;
 	}
diff --git a/archival/tar.c b/archival/tar.c
index 22cbf3a..19c84a7 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -516,14 +516,10 @@
 {
 	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);
 	}