Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Whitley <markw@lineo.com>2001-04-17 22:26:11 +0400
committerMark Whitley <markw@lineo.com>2001-04-17 22:26:11 +0400
commit6e808ca35419ba7ec14dd836f0e013ea35ff0aee (patch)
tree89d3f02764ce992ab2ecc796388906a934eb0e53 /coreutils/sort.c
parent30ac01cca753a3e17e4abddf9ff81e4616390b86 (diff)
Changed line[strlen(line) - 1] = '\0'; to chomp(line);
Diffstat (limited to 'coreutils/sort.c')
-rw-r--r--coreutils/sort.c2
1 files changed, 1 insertions, 1 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;
}
}