aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
authorElie De Brauwer <eliedebrauwer@gmail.com>2012-12-15 19:28:29 +0100
committerElie De Brauwer <eliedebrauwer@gmail.com>2012-12-15 19:28:29 +0100
commitd4d51198e8d7b650850d8c6e0b02b511ff61c07f (patch)
treed4bc839da890c027c6c9a739eeeac0d28b2c9c44 /toys/other
parent28eeadd37b196486f5401d447266790f84364732 (diff)
downloadtoybox-d4d51198e8d7b650850d8c6e0b02b511ff61c07f.tar.gz
Simplify tac, the newline checking is already done in the get_line() function
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/tac.c3
1 files changed, 0 insertions, 3 deletions
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;