1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-02 22:41:42 +02:00

(parse_ls_color): Use strcpy to initialize 3-character array.

Automatic aggregate initialization isn't portable.
This commit is contained in:
Jim Meyering
1996-04-29 04:31:24 +00:00
parent aa7d0d8c85
commit 95439d0f33
+2 -1
View File
@@ -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'))
{