summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2009-09-01 23:43:31 +0200
committerMichael Stapelberg <michael@stapelberg.de>2009-09-01 23:43:31 +0200
commit112512c546c8d9a46b503b5e4b9cc10afb1a248e (patch)
tree6f848e8b91a2b89e9525e376dffb598c69faef6b /src
parent1c0e5ea560869092a7779c9d5984ded6848794ce (diff)
Initialize order array with -1 to avoid printing duplicate lines (Thanks XTaran)
Diffstat (limited to 'src')
-rw-r--r--src/config.c4
1 files changed, 4 insertions, 0 deletions
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;