From: Jim Meyering Date: Mon, 29 Apr 1996 04:31:24 +0000 (+0000) Subject: (parse_ls_color): Use strcpy to initialize 3-character array. X-Git-Tag: TEXTUTILS-1_14d~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95439d0f333a29132e17edbf1d9ce68fb6757f5e;p=thirdparty%2Fcoreutils.git (parse_ls_color): Use strcpy to initialize 3-character array. Automatic aggregate initialization isn't portable. --- diff --git a/src/ls.c b/src/ls.c index b8b5ba401e..6886b72e87 100644 --- a/src/ls.c +++ b/src/ls.c @@ -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')) {