summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2098d38)
raw | patch | inline | side by side (parent: 2098d38)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 22 Nov 2008 00:03:25 +0000 (01:03 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 22 Nov 2008 00:03:25 +0000 (01:03 +0100) |
Not all targets actually need to be created, for example
the `stop' target.
the `stop' target.
src/filter_chain.c | patch | blob | history |
diff --git a/src/filter_chain.c b/src/filter_chain.c
index 578442602932627a7f7b72ea57145a816f0db6be..154a4abe99ddc5ed6baa4f761167a2b7c0b1c412 100644 (file)
--- a/src/filter_chain.c
+++ b/src/filter_chain.c
sstrncpy (t->name, ptr->name, sizeof (t->name));
memcpy (&t->proc, &ptr->proc, sizeof (t->proc));
- assert (t->proc.create != NULL);
t->user_data = NULL;
t->next = NULL;
- status = (*t->proc.create) (ci, &t->user_data);
- if (status != 0)
+ if (t->proc.create != NULL)
{
- WARNING ("Filter subsystem: Failed to create a %s match.",
- t->name);
- fc_free_targets (t);
- return (-1);
+ status = (*t->proc.create) (ci, &t->user_data);
+ if (status != 0)
+ {
+ WARNING ("Filter subsystem: Failed to create a %s match.",
+ t->name);
+ fc_free_targets (t);
+ return (-1);
+ }
+ }
+ else
+ {
+ t->user_data = NULL;
}
if (*targets_head != NULL)