[git commit] cut: "orig_line" is redundant, remove it
Denys Vlasenko
vda.linux at googlemail.com
Tue Dec 10 00:55:25 UTC 2024
commit: https://git.busybox.net/busybox/commit/?id=808155ebf3e731538643e2fa840daeb76aac5435
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
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
}
More information about the busybox-cvs
mailing list