X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Fcore%2Fplugin.c;h=559e6eb4d7db1aa803a55783025d2dc4a8ee6afb;hp=46976d01f7435c580e088f3aebd7836ad14ebbf4;hb=39a45905e0b237e458b1826ff9b4fad1c4a59550;hpb=6e7b1987b6a571c0f2815b8507ec9373981f058e diff --git a/src/core/plugin.c b/src/core/plugin.c index 46976d0..559e6eb 100644 --- a/src/core/plugin.c +++ b/src/core/plugin.c @@ -25,6 +25,10 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#if HAVE_CONFIG_H +# include "config.h" +#endif /* HAVE_CONFIG_H */ + #include "sysdb.h" #include "core/plugin.h" #include "core/time.h" @@ -386,7 +390,7 @@ plugin_add_callback(sdb_llist_t **list, const char *type, int sdb_plugin_load(const char *name, const sdb_plugin_ctx_t *plugin_ctx) { - char real_name[strlen(name) > 0 ? strlen(name) : 1]; + char real_name[name ? strlen(name) + 1 : 1]; const char *name_ptr; char *tmp;