From: Florian Forster Date: Wed, 7 Jul 2010 13:53:10 +0000 (+0200) Subject: Various: Remove argument validation after profiling. X-Git-Tag: v4.0.0~134 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d03bbb38c5177de7ad4da2934980ebd9d119f287;p=collection4.git Various: Remove argument validation after profiling. --- diff --git a/src/graph.c b/src/graph.c index 5c143b4..49bd765 100644 --- a/src/graph.c +++ b/src/graph.c @@ -299,8 +299,10 @@ int graph_add_def (graph_config_t *cfg, graph_def_t *def) /* {{{ */ _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 d1b1b05..7dda849 100644 --- a/src/graph_ident.c +++ b/src/graph_ident.c @@ -94,8 +94,10 @@ static char *part_copy_with_selector (const char *selector, /* {{{ */ 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); @@ -401,8 +403,10 @@ int ident_compare (const graph_ident_t *i0, /* {{{ */ _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 cce7265..0b71e15 100644 --- a/src/graph_instance.c +++ b/src/graph_instance.c @@ -445,8 +445,10 @@ int inst_compare_ident (graph_instance_t *inst, /* {{{ */ _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 */