Mercurial > hg > toybox
changeset 751:f7eaff0c8d0c
Simplify tac, the newline checking is already done in the get_line() function
author | Elie De Brauwer <eliedebrauwer@gmail.com> |
---|---|
date | Sat, 15 Dec 2012 19:28:29 +0100 |
parents | 1e1abf1113f2 |
children | d020ee45c227 |
files | toys/other/tac.c |
diffstat | 1 files changed, 0 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/toys/other/tac.c Sun Dec 16 15:27:33 2012 -0600 +++ b/toys/other/tac.c Sat Dec 15 19:28:29 2012 +0100 @@ -23,12 +23,9 @@ // Read in lines for (;;) { struct arg_list *temp; - int len; if (!(c = get_line(fd))) break; - len = strlen(c); - if (len && c[len-1]=='\n') c[len-1] = 0; temp = xmalloc(sizeof(struct arg_list)); temp->next = list; temp->arg = c;