summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 689b592)
raw | patch | inline | side by side (parent: 689b592)
author | Pavel Rochnyack <pavel2000@ngs.ru> | |
Sat, 7 Oct 2017 19:30:13 +0000 (02:30 +0700) | ||
committer | Pavel Rochnyack <pavel2000@ngs.ru> | |
Sat, 7 Oct 2017 19:30:13 +0000 (02:30 +0700) |
src/ipmi.c | patch | blob | history |
diff --git a/src/ipmi.c b/src/ipmi.c
index 7337dc458c65db9869847e4ce7ebbaf8bdc0851e..6f8a18f46cb2be76da4bd8dc1f607285804bbb8a 100644 (file)
--- a/src/ipmi.c
+++ b/src/ipmi.c
} /* int c_ipmi_thread_init */
static void *c_ipmi_thread_main(void *user_data) {
- int status;
c_ipmi_instance_t *st = (c_ipmi_instance_t *)user_data;
- status = c_ipmi_thread_init(st);
+ int status = c_ipmi_thread_init(st);
if (status != 0) {
ERROR("ipmi plugin: c_ipmi_thread_init failed.");
st->active = 0;
sfree(st);
} /* void c_ipmi_free_instance */
-void c_ipmi_add_instance(c_ipmi_instance_t *instance) {
+static void c_ipmi_add_instance(c_ipmi_instance_t *instance) {
if (instances == NULL) {
instances = instance;
return;
last = last->next;
last->next = instance;
-
- return;
} /* void c_ipmi_add_instance */
static int c_ipmi_config_add_instance(oconfig_item_t *ci) {
} /* int c_ipmi_config */
static int c_ipmi_read(user_data_t *user_data) {
- c_ipmi_instance_t *st;
- st = user_data->data;
+ c_ipmi_instance_t *st = user_data->data;
if ((st->active == 0) || (st->thread_id == (pthread_t)0)) {
INFO("ipmi plugin: c_ipmi_read: I'm not active, returning false.");