diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-06 12:47:55 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-06 12:47:55 +0200 |
commit | 043b1e5d997d9b582a5aee37bd56e2e4f29be6e4 (patch) | |
tree | bab07bc427f178857896a8bf252c61ea1a5c67a2 /coreutils/cut.c | |
parent | 5370bfb123266ab5716f321e43d3f8f6da7d7143 (diff) | |
download | busybox-w32-043b1e5d997d9b582a5aee37bd56e2e4f29be6e4.tar.gz busybox-w32-043b1e5d997d9b582a5aee37bd56e2e4f29be6e4.tar.bz2 busybox-w32-043b1e5d997d9b582a5aee37bd56e2e4f29be6e4.zip |
more C standard compat fixes from Dan Fandrich
function old new delta
docolon 207 204 -3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/cut.c')
-rw-r--r-- | coreutils/cut.c | 5 |
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 | |||
111 | int ndelim = -1; /* zero-based / one-based problem */ | 111 | int ndelim = -1; /* zero-based / one-based problem */ |
112 | int nfields_printed = 0; | 112 | int nfields_printed = 0; |
113 | char *field = NULL; | 113 | char *field = NULL; |
114 | const char delimiter[2] = { delim, 0 }; | 114 | char delimiter[2]; |
115 | |||
116 | delimiter[0] = delim; | ||
117 | delimiter[1] = 0; | ||
115 | 118 | ||
116 | /* does this line contain any delimiters? */ | 119 | /* does this line contain any delimiters? */ |
117 | if (strchr(line, delim) == NULL) { | 120 | if (strchr(line, delim) == NULL) { |