From: Florian Forster Date: Wed, 7 Jul 2010 14:16:09 +0000 (+0200) Subject: src/graph.c: Fix "graph_sort_instances". X-Git-Tag: v4.0.0~128 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b53e616d07cc7b10d1d159d01e20ea4eb8284b5e;p=collection4.git src/graph.c: Fix "graph_sort_instances". --- diff --git a/src/graph.c b/src/graph.c index 9d435c2..d3a8d6f 100644 --- a/src/graph.c +++ b/src/graph.c @@ -484,6 +484,12 @@ int graph_compare (graph_config_t *cfg, const graph_ident_t *ident) /* {{{ */ return (ident_compare (cfg->select, ident)); } /* }}} int graph_compare */ +static int graph_sort_instances_cb (const void *v0, const void *v1) /* {{{ */ +{ + return (ident_compare (*(graph_ident_t * const *) v0, + *(graph_ident_t * const *) v1)); +} /* }}} int graph_sort_instances_cb */ + int graph_sort_instances (graph_config_t *cfg) /* {{{ */ { if (cfg == NULL) @@ -493,7 +499,7 @@ int graph_sort_instances (graph_config_t *cfg) /* {{{ */ return (0); qsort (cfg->instances, cfg->instances_num, sizeof (*cfg->instances), - (void *) ident_compare); + graph_sort_instances_cb); return (0); } /* }}} int graph_sort_instances */