summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3ae8921)
raw | patch | inline | side by side (parent: 3ae8921)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 16 Feb 2009 14:16:48 +0000 (15:16 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 16 Feb 2009 14:22:05 +0000 (15:22 +0100) |
In most cases it does not make sense to not provide a create callback.
However, we never know what the future might bring, so let's chose the more
flexible approach.
However, we never know what the future might bring, so let's chose the more
flexible approach.
src/filter_chain.c | patch | blob | history |
diff --git a/src/filter_chain.c b/src/filter_chain.c
index 70a37bf6c2023aa087d7657c8135b368da8f98b0..9a52f7c99504179cfdf43f6d2266b9a2c2f81be7 100644 (file)
--- a/src/filter_chain.c
+++ b/src/filter_chain.c
sstrncpy (m->name, ptr->name, sizeof (m->name));
memcpy (&m->proc, &ptr->proc, sizeof (m->proc));
- assert (m->proc.create != NULL);
m->user_data = NULL;
m->next = NULL;
- status = (*m->proc.create) (ci, &m->user_data);
- if (status != 0)
+ if (m->proc.create != NULL)
{
- WARNING ("Filter subsystem: Failed to create a %s match.",
- m->name);
- fc_free_matches (m);
- return (-1);
+ status = (*m->proc.create) (ci, &m->user_data);
+ if (status != 0)
+ {
+ WARNING ("Filter subsystem: Failed to create a %s match.",
+ m->name);
+ fc_free_matches (m);
+ return (-1);
+ }
}
-
+
if (*matches_head != NULL)
{
ptr = *matches_head;