Changed line[strlen(line) - 1] = '\0'; to chomp(line);

This commit is contained in:
Mark Whitley 2001-04-17 18:26:11 +00:00
parent 30ac01cca7
commit 6e808ca354
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ int sort_main(int argc, char **argv)
while ((line = get_line_from_file(fp)) != NULL) { while ((line = get_line_from_file(fp)) != NULL) {
lines = xrealloc(lines, sizeof(char *) * (nlines + 1)); lines = xrealloc(lines, sizeof(char *) * (nlines + 1));
line[strlen(line) - 1] = '\0'; chomp(line);
lines[nlines++] = line; lines[nlines++] = line;
} }
} }

2
sort.c
View File

@ -71,7 +71,7 @@ int sort_main(int argc, char **argv)
while ((line = get_line_from_file(fp)) != NULL) { while ((line = get_line_from_file(fp)) != NULL) {
lines = xrealloc(lines, sizeof(char *) * (nlines + 1)); lines = xrealloc(lines, sizeof(char *) * (nlines + 1));
line[strlen(line) - 1] = '\0'; chomp(line);
lines[nlines++] = line; lines[nlines++] = line;
} }
} }