From: Michael Stapelberg Date: Tue, 1 Sep 2009 21:43:31 +0000 (+0200) Subject: Initialize order array with -1 to avoid printing duplicate lines (Thanks XTaran) X-Git-Tag: 2.0~34 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=112512c546c8d9a46b503b5e4b9cc10afb1a248e;p=i3%2Fi3status Initialize order array with -1 to avoid printing duplicate lines (Thanks XTaran) --- diff --git a/src/config.c b/src/config.c index 19c03e9..e39c19b 100644 --- a/src/config.c +++ b/src/config.c @@ -112,6 +112,10 @@ int load_configuration(const char *configfile) { } OPT("order") { + + for (int c = 0; c < MAX_ORDER; c++) + order[c] = -1; + #define SET_ORDER(opt, idx) { if (strcasecmp(token, opt) == 0) order[idx] = highest_order++; } char *walk, *token; walk = token = dest_value;