From 7173d20ea5c32867ccb6a10f3417a632e41bfe66 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 7 Jul 2010 17:24:01 +0200 Subject: [PATCH] src/graph_instance.[ch]: Implement "inst_compare". --- src/graph_instance.c | 6 ++++++ src/graph_instance.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/graph_instance.c b/src/graph_instance.c index 0b71e15..93fc3c5 100644 --- a/src/graph_instance.c +++ b/src/graph_instance.c @@ -433,6 +433,12 @@ int inst_get_params (graph_config_t *cfg, graph_instance_t *inst, /* {{{ */ return (0); } /* }}} int inst_get_params */ +int inst_compare (const graph_instance_t *i0, /* {{{ */ + const graph_instance_t *i1) +{ + return (ident_compare (i0->select, i1->select)); +} /* }}} int inst_compare */ + int inst_compare_ident (graph_instance_t *inst, /* {{{ */ const graph_ident_t *ident) { diff --git a/src/graph_instance.h b/src/graph_instance.h index cca55dc..249fe4d 100644 --- a/src/graph_instance.h +++ b/src/graph_instance.h @@ -54,6 +54,8 @@ int inst_get_rrdargs (graph_config_t *cfg, graph_instance_t *inst, graph_ident_t *inst_get_selector (graph_instance_t *inst); +int inst_compare (const graph_instance_t *i0, const graph_instance_t *i1); + int inst_compare_ident (graph_instance_t *inst, const graph_ident_t *ident); /* Returns true if "ident" matches the instance's selector. */ -- 2.30.2