diff options
author | Jim Meyering <jim@meyering.net> | 1996-04-29 04:31:24 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-04-29 04:31:24 +0000 |
commit | 95439d0f333a29132e17edbf1d9ce68fb6757f5e (patch) | |
tree | 5f1cdad4c6b32736fdcaa6b6da41479c23cdc374 /src | |
parent | aa7d0d8c852552c4352f65adb8ce42b601f3f91c (diff) | |
download | coreutils-95439d0f333a29132e17edbf1d9ce68fb6757f5e.tar.xz |
(parse_ls_color): Use strcpy to initialize 3-character array.
Automatic aggregate initialization isn't portable.
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1290,10 +1290,11 @@ parse_ls_color (void) char *buf; /* color_buf buffer pointer */ int state; /* State of parser */ int ind_no; /* Indicator number */ - char label[3] = "??"; /* Indicator label */ + char label[3]; /* Indicator label */ struct col_ext_type *ext; /* Extension we are working on */ struct col_ext_type *ext2; /* Extra pointer */ + strcpy (label, "??"); if (((p = getenv (whichvar = "LS_COLORS")) != NULL && *p != '\0') || ((p = getenv (whichvar = "LS_COLOURS")) != NULL && *p != '\0')) { |