aboutsummaryrefslogtreecommitdiff
path: root/coreutils/cut.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/cut.c')
-rw-r--r--coreutils/cut.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 9cc22be16..240ce4bb9 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -111,7 +111,10 @@ static void cut_file(FILE *file, char delim, const struct cut_list *cut_lists, u
int ndelim = -1; /* zero-based / one-based problem */
int nfields_printed = 0;
char *field = NULL;
- const char delimiter[2] = { delim, 0 };
+ char delimiter[2];
+
+ delimiter[0] = delim;
+ delimiter[1] = 0;
/* does this line contain any delimiters? */
if (strchr(line, delim) == NULL) {