summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da4f69a)
raw | patch | inline | side by side (parent: da4f69a)
author | Florian Forster <ff@octo.it> | |
Fri, 2 Jul 2010 18:31:23 +0000 (20:31 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 2 Jul 2010 18:31:23 +0000 (20:31 +0200) |
src/graph.c | patch | blob | history |
diff --git a/src/graph.c b/src/graph.c
index 8d12a25a1606d397d4ac20e66cb91fe9b45af9ee..d4b1a328db2e6c5124e50e5fdcf82a0d3c8dba5e 100644 (file)
--- a/src/graph.c
+++ b/src/graph.c
int graph_add_def (graph_config_t *cfg, graph_def_t *def) /* {{{ */
{
+ graph_def_t *tmp;
+
if ((cfg == NULL) || (def == NULL))
return (EINVAL);
return (0);
}
- return (def_append (cfg->defs, def));
+ /* Insert in reverse order. This makes the order in the config file and the
+ * order of the DEFs in the graph more natural. Really. */
+ tmp = cfg->defs;
+ cfg->defs = def;
+ return (def_append (cfg->defs, tmp));
} /* }}} int graph_add_def */
_Bool graph_matches_ident (graph_config_t *cfg, const graph_ident_t *ident) /* {{{ */