From 51840088128a25a642744db3a2bff380952ca375 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 8 Jan 2011 18:27:31 +0100 Subject: [PATCH] input_init: add assertions on completeness of plugins --- src/input_init.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 #include 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) {