summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6cde759)
raw | patch | inline | side by side (parent: 6cde759)
author | Florian Forster <octo@collectd.org> | |
Wed, 18 Oct 2017 18:59:49 +0000 (20:59 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Mon, 23 Oct 2017 13:19:57 +0000 (15:19 +0200) |
Primarily to test the clang-format bot.
src/daemon/plugin.c | patch | blob | history |
diff --git a/src/daemon/plugin.c b/src/daemon/plugin.c
index ae99d5fdfa13bb9aef4b7d6efb994dcb6078e01b..9b75f698adff4f630a6114e2652e0ded5c882fac 100644 (file)
--- a/src/daemon/plugin.c
+++ b/src/daemon/plugin.c
} /* int plugin_register_missing */
int plugin_register_shutdown(const char *name, int (*callback)(void)) {
- return create_register_callback(&list_shutdown, name, (void *)callback,
- NULL);
+ return create_register_callback(&list_shutdown, name, (void *)callback, NULL);
} /* int plugin_register_shutdown */
static void plugin_free_data_sets(void) {
int plugin_dispatch_missing(const value_list_t *vl) /* {{{ */
{
- llentry_t *le;
-
if (list_missing == NULL)
return 0;
- le = llist_head(list_missing);
+ llentry_t *le = llist_head(list_missing);
while (le != NULL) {
- callback_func_t *cf;
- plugin_missing_cb callback;
- plugin_ctx_t old_ctx;
- int status;
+ callback_func_t *cf = le->value;
+ plugin_ctx_t old_ctx = plugin_set_ctx(cf->cf_ctx);
+ plugin_missing_cb callback = cf->cf_callback;
- cf = le->value;
- old_ctx = plugin_set_ctx(cf->cf_ctx);
- callback = cf->cf_callback;
-
- status = (*callback)(vl, &cf->cf_udata);
+ int status = (*callback)(vl, &cf->cf_udata);
plugin_set_ctx(old_ctx);
if (status != 0) {
if (status < 0) {
int status;
static c_complain_t no_write_complaint = C_COMPLAIN_INIT_STATIC;
- data_set_t *ds;
-
_Bool free_meta_data = 0;
assert(vl != NULL);
return -1;
}
+ data_set_t *ds = NULL;
if (c_avl_get(data_sets, vl->type, (void *)&ds) != 0) {
char ident[6 * DATA_MAX_NAME_LEN];