summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ad1116e)
raw | patch | inline | side by side (parent: ad1116e)
author | Florian Forster <ff@octo.it> | |
Wed, 7 Jul 2010 13:53:10 +0000 (15:53 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 7 Jul 2010 13:53:10 +0000 (15:53 +0200) |
src/graph.c | patch | blob | history | |
src/graph_ident.c | patch | blob | history | |
src/graph_instance.c | patch | blob | history |
diff --git a/src/graph.c b/src/graph.c
index 5c143b46641c3b8aafebddd1bc2f00898f433c8a..49bd765f0ad7a25a0cfcc6c4b6901a2b037842f1 100644 (file)
--- a/src/graph.c
+++ b/src/graph.c
_Bool graph_matches_ident (graph_config_t *cfg, const graph_ident_t *ident) /* {{{ */
{
+#if C4_DEBUG
if ((cfg == NULL) || (ident == NULL))
return (0);
+#endif
return (ident_matches (cfg->select, ident));
} /* }}} _Bool graph_matches_ident */
diff --git a/src/graph_ident.c b/src/graph_ident.c
index d1b1b056af763c414a9f8b3e5f8f5b73215084b5..7dda849e0794bb01f9e19c3d75a58529126a9e80 100644 (file)
--- a/src/graph_ident.c
+++ b/src/graph_ident.c
static _Bool part_matches (const char *selector, /* {{{ */
const char *part)
{
+#if C4_DEBUG
if ((selector == NULL) && (part == NULL))
return (1);
+#endif
if (selector == NULL) /* && (part != NULL) */
return (0);
_Bool ident_matches (const graph_ident_t *selector, /* {{{ */
const graph_ident_t *ident)
{
+#if C4_DEBUG
if ((selector == NULL) || (ident == NULL))
return (0);
+#endif
if (!part_matches (selector->host, ident->host))
return (0);
diff --git a/src/graph_instance.c b/src/graph_instance.c
index cce72659d71ab9f5b12fed4f9b2c8b7838defeba..0b71e15e1fdf897ba2a8e477533092c7ff3eebea 100644 (file)
--- a/src/graph_instance.c
+++ b/src/graph_instance.c
_Bool inst_ident_matches (graph_instance_t *inst, /* {{{ */
const graph_ident_t *ident)
{
+#if C4_DEBUG
if ((inst == NULL) || (ident == NULL))
return (0);
+#endif
return (ident_matches (inst->select, ident));
} /* }}} _Bool inst_ident_matches */