summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7e94625)
raw | patch | inline | side by side (parent: 7e94625)
author | Florian Forster <octo@collectd.org> | |
Wed, 21 Dec 2016 14:02:05 +0000 (15:02 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Wed, 21 Dec 2016 16:23:05 +0000 (17:23 +0100) |
Fixes: #2120
src/netapp.c | patch | blob | history |
diff --git a/src/netapp.c b/src/netapp.c
index 4d458793f9a6b2e270ccafbc32cc216a2527ce7b..45144bf1e964d227bea685dd7081ecf17f0f1e30 100644 (file)
--- a/src/netapp.c
+++ b/src/netapp.c
const char *type, const char *type_inst, double d,
cdtime_t timestamp, cdtime_t interval) {
return (submit_values(host, plugin_inst, type, type_inst,
- &(value_t){.gauge = counter}, 1, timestamp, interval));
+ &(value_t){.gauge = d}, 1, timestamp, interval));
} /* }}} int submit_uint64 */
/* Calculate hit ratio from old and new counters and submit the resulting
static int cna_handle_snapvault_data(const char *hostname, /* {{{ */
cfg_snapvault_t *cfg_snapvault,
na_elem_t *data, cdtime_t interval) {
- na_elem_iter_t status_iter;
-
- status = na_elem_child(data, "status-list");
- if (!status) {
+ na_elem_t *status_list = na_elem_child(data, "status-list");
+ if (status_list == NULL) {
ERROR("netapp plugin: SnapVault status record missing status-list");
return (0);
}
- status_iter = na_child_iterator(status);
+ na_elem_iter_t status_iter = na_child_iterator(status_list);
for (na_elem_t *status = na_iterator_next(&status_iter); status != NULL;
status = na_iterator_next(&status_iter)) {
const char *dest_sys, *dest_path, *src_sys, *src_path;