aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-01-08 18:27:31 +0100
committerMax Kellermann <max@duempel.org>2011-01-08 18:27:57 +0100
commit51840088128a25a642744db3a2bff380952ca375 (patch)
tree82fff2a1b5a80f577335d8b368bb1ded4f7e7d77
parentcf696ce443c8cbcd9ba673cfc31370d9c461d234 (diff)
downloadmpd-51840088128a25a642744db3a2bff380952ca375.tar.gz
mpd-51840088128a25a642744db3a2bff380952ca375.tar.xz
mpd-51840088128a25a642744db3a2bff380952ca375.zip
input_init: add assertions on completeness of plugins
-rw-r--r--src/input_init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/input_init.c b/src/input_init.c
index 1438c3e52..11f020dad 100644
--- a/src/input_init.c
+++ b/src/input_init.c
@@ -24,6 +24,7 @@
#include "conf.h"
#include "glib_compat.h"
+#include <assert.h>
#include <string.h>
static inline GQuark
@@ -67,6 +68,11 @@ input_stream_global_init(GError **error_r)
for (unsigned i = 0; input_plugins[i] != NULL; ++i) {
const struct input_plugin *plugin = input_plugins[i];
+
+ assert(plugin->name != NULL);
+ assert(*plugin->name != 0);
+ assert(plugin->open != NULL);
+
const struct config_param *param =
input_plugin_config(plugin->name, &error);
if (param == NULL && error != NULL) {