X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fgraph_def.c;h=b3589059a5b3b57f6bb24c436152f0356e4563fc;hb=54f061537f01d36d0ecac0777fdb12780723eaa0;hp=9aba1ce133371e25d27f54248079d99d35d28d90;hpb=593828eb6109b2f0ee43f090d64a252f0ff92774;p=collection4.git diff --git a/src/graph_def.c b/src/graph_def.c index 9aba1ce..b358905 100644 --- a/src/graph_def.c +++ b/src/graph_def.c @@ -158,15 +158,22 @@ graph_def_t *def_create (graph_config_t *cfg, graph_ident_t *ident, /* {{{ */ graph_def_t *ret; if ((cfg == NULL) || (ident == NULL) || (ds_name == NULL)) + { + fprintf (stderr, "def_create: An argument is NULL\n"); return (NULL); + } selector = graph_get_selector (cfg); if (selector == NULL) + { + fprintf (stderr, "def_create: graph_get_selector failed\n"); return (NULL); + } ret = malloc (sizeof (*ret)); if (ret == NULL) { + fprintf (stderr, "def_create: malloc failed\n"); ident_destroy (selector); return (NULL); } @@ -177,6 +184,7 @@ graph_def_t *def_create (graph_config_t *cfg, graph_ident_t *ident, /* {{{ */ ret->ds_name = strdup (ds_name); if (ret->ds_name == NULL) { + fprintf (stderr, "def_create: Unable to copy DS name\n"); ident_destroy (selector); free (ret); return (NULL); @@ -186,9 +194,10 @@ graph_def_t *def_create (graph_config_t *cfg, graph_ident_t *ident, /* {{{ */ ret->next = NULL; ret->select = ident_copy_with_selector (selector, ident, - IDENT_FLAG_REPLACE_ANY); + IDENT_FLAG_REPLACE_ALL); if (ret->select == NULL) { + fprintf (stderr, "def_create: ident_copy_with_selector failed\n"); ident_destroy (selector); free (ret->ds_name); free (ret);