projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
733fc64
)
routeros: Fix codestyle of latest change
author
Pavel Rochnyack
<pavel2000@ngs.ru>
Sun, 8 Jul 2018 14:06:36 +0000
(21:06 +0700)
committer
Pavel Rochnyack
<pavel2000@ngs.ru>
Sun, 8 Jul 2018 14:06:36 +0000
(21:06 +0700)
src/routeros.c
patch
|
blob
|
history
diff --git
a/src/routeros.c
b/src/routeros.c
index
111feb6
..
07d37c7
100644
(file)
--- a/
src/routeros.c
+++ b/
src/routeros.c
@@
-219,16
+219,16
@@
static int handle_system_health(__attribute__((unused))
ros_connection_t *c, /* {{{ */
const ros_system_health_t *r,
__attribute__((unused)) void *user_data) {
ros_connection_t *c, /* {{{ */
const ros_system_health_t *r,
__attribute__((unused)) void *user_data) {
- cr_data_t *rd;
if ((r == NULL) || (user_data == NULL))
if ((r == NULL) || (user_data == NULL))
- return (EINVAL);
- rd = user_data;
+ return EINVAL;
+
+ cr_data_t *rd = user_data;
cr_submit_gauge(rd, "voltage", "system", (gauge_t)r->voltage);
cr_submit_gauge(rd, "temperature", "system", (gauge_t)r->temperature);
cr_submit_gauge(rd, "voltage", "system", (gauge_t)r->voltage);
cr_submit_gauge(rd, "temperature", "system", (gauge_t)r->temperature);
- return
(0)
;
+ return
0
;
} /* }}} int handle_system_health */
#endif
#endif
} /* }}} int handle_system_health */
#endif
#endif
@@
-297,12
+297,10
@@
static int cr_read(user_data_t *user_data) /* {{{ */
status = ros_system_health(rd->connection, handle_system_health,
/* user data = */ rd);
if (status != 0) {
status = ros_system_health(rd->connection, handle_system_health,
/* user data = */ rd);
if (status != 0) {
- char errbuf[128];
- ERROR("routeros plugin: ros_system_health failed: %s",
- sstrerror(status, errbuf, sizeof(errbuf)));
+ ERROR("routeros plugin: ros_system_health failed: %s", STRERROR(status));
ros_disconnect(rd->connection);
rd->connection = NULL;
ros_disconnect(rd->connection);
rd->connection = NULL;
- return
(-1)
;
+ return
-1
;
}
}
#endif
}
}
#endif