From d4d51198e8d7b650850d8c6e0b02b511ff61c07f Mon Sep 17 00:00:00 2001 From: Elie De Brauwer Date: Sat, 15 Dec 2012 19:28:29 +0100 Subject: Simplify tac, the newline checking is already done in the get_line() function --- toys/other/tac.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'toys') diff --git a/toys/other/tac.c b/toys/other/tac.c index 78b22866..9ebc7f69 100644 --- a/toys/other/tac.c +++ b/toys/other/tac.c @@ -23,12 +23,9 @@ void do_tac(int fd, char *name) // 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; -- cgit v1.2.3