From: Jim Meyering Date: Fri, 10 Nov 1995 14:54:08 +0000 (+0000) Subject: (parse_ls_color): Use strcpy to initialize 3-character array. X-Git-Tag: TEXTUTILS-1_13F~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6394074a8f80fe2879195eab6a275dad39c1789;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 dd42e0b60c..e07c0eaa9d 100644 --- a/src/ls.c +++ b/src/ls.c @@ -1059,8 +1059,9 @@ parse_ls_color (void) int ind_no; /* Indicator number */ int ccount; /* Character count */ int num; /* Escape char numeral */ - char label[3] = "??"; /* Indicator label */ + char label[3]; /* Indicator label */ + strcpy (label, "??"); if ((p = getenv (whichvar = "LS_COLORS")) || (p = getenv (whichvar = "LS_COLOURS"))) {