data_set_t *ds_copy;
int i;
- if (llist_search (list_data_set, ds->type) != NULL)
+ if ((list_data_set != NULL)
+ && (llist_search (list_data_set, ds->type) != NULL))
{
NOTICE ("Replacing DS `%s' with another version.", ds->type);
plugin_unregister_data_set (ds->type);
llentry_t *e;
data_set_t *ds;
+ if (list_data_set == NULL)
+ return (-1);
+
e = llist_search (list_data_set, name);
if (e == NULL)
data_set_t *ds;
llentry_t *le;
- if (list_write == NULL)
+ if ((list_write == NULL) || (list_data_set == NULL))
return (-1);
le = llist_search (list_data_set, name);
vl->plugin, vl->plugin_instance,
ds->type, vl->type_instance);
+#if COLLECT_DEBUG
+ assert (ds->ds_num == vl->values_len);
+#else
+ if (ds->ds_num != vl->values_len)
+ {
+ ERROR ("plugin: ds->type = %s: (ds->ds_num = %i) != "
+ "(vl->values_len = %i)",
+ ds->type, ds->ds_num, vl->values_len);
+ return (-1);
+ }
+#endif
+
le = llist_head (list_write);
while (le != NULL)
{