diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2024-12-10 01:55:25 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2024-12-10 01:55:25 +0100 |
commit | 808155ebf3e731538643e2fa840daeb76aac5435 (patch) | |
tree | 36ba07547f366c644d91edf2bf2cd031874ab0a6 | |
parent | 478ac90f2c55cf66c13aa9805bde69bc705647c3 (diff) | |
download | busybox-w32-808155ebf3e731538643e2fa840daeb76aac5435.tar.gz busybox-w32-808155ebf3e731538643e2fa840daeb76aac5435.tar.bz2 busybox-w32-808155ebf3e731538643e2fa840daeb76aac5435.zip |
cut: "orig_line" is redundant, remove it
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | coreutils/cut.c | 3 |
1 files changed, 1 insertions, 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, | |||
101 | 101 | ||
102 | /* set up a list so we can keep track of what's been printed */ | 102 | /* set up a list so we can keep track of what's been printed */ |
103 | int linelen = strlen(line); | 103 | int linelen = strlen(line); |
104 | char *orig_line = line; | ||
105 | unsigned cl_pos = 0; | 104 | unsigned cl_pos = 0; |
106 | 105 | ||
107 | /* cut based on chars/bytes XXX: only works when sizeof(char) == byte */ | 106 | /* 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, | |||
216 | putchar('\n'); | 215 | putchar('\n'); |
217 | next_line: | 216 | next_line: |
218 | linenum++; | 217 | linenum++; |
219 | free(orig_line); | 218 | free(line); |
220 | } /* while (got line) */ | 219 | } /* while (got line) */ |
221 | #undef opt_REGEX | 220 | #undef opt_REGEX |
222 | } | 221 | } |