From 6821ee60c553c0ac4e73d50d71e4d17cceb17547 Mon Sep 17 00:00:00 2001 From: markw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277> Date: Tue, 17 Apr 2001 18:26:11 +0000 Subject: Changed line[strlen(line) - 1] = '\0'; to chomp(line); git-svn-id: svn://busybox.net/trunk/busybox@2362 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- coreutils/sort.c | 2 +- sort.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coreutils/sort.c b/coreutils/sort.c index b84453d3a..5ecca8b8f 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c @@ -71,7 +71,7 @@ int sort_main(int argc, char **argv) while ((line = get_line_from_file(fp)) != NULL) { lines = xrealloc(lines, sizeof(char *) * (nlines + 1)); - line[strlen(line) - 1] = '\0'; + chomp(line); lines[nlines++] = line; } } diff --git a/sort.c b/sort.c index b84453d3a..5ecca8b8f 100644 --- a/sort.c +++ b/sort.c @@ -71,7 +71,7 @@ int sort_main(int argc, char **argv) while ((line = get_line_from_file(fp)) != NULL) { lines = xrealloc(lines, sizeof(char *) * (nlines + 1)); - line[strlen(line) - 1] = '\0'; + chomp(line); lines[nlines++] = line; } } -- cgit v1.2.3-55-g6feb