From 808155ebf3e731538643e2fa840daeb76aac5435 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 10 Dec 2024 01:55:25 +0100 Subject: cut: "orig_line" is redundant, remove it Signed-off-by: Denys Vlasenko --- coreutils/cut.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/coreutils/cut.c b/coreutils/cut.c index ca2408f97..72a6f2b80 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c @@ -101,7 +101,6 @@ static void cut_file(FILE *file, const char *delim, const char *odelim, /* set up a list so we can keep track of what's been printed */ int linelen = strlen(line); - char *orig_line = line; unsigned cl_pos = 0; /* cut based on chars/bytes XXX: only works when sizeof(char) == byte */ @@ -216,7 +215,7 @@ static void cut_file(FILE *file, const char *delim, const char *odelim, putchar('\n'); next_line: linenum++; - free(orig_line); + free(line); } /* while (got line) */ #undef opt_REGEX } -- cgit v1.2.3-55-g6feb