projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #3104 from rubenk/intel-rdt-fix-compiler-warnings
[collectd.git]
/
src
/
users.c
diff --git
a/src/users.c
b/src/users.c
index
1ae128e
..
fc03ba2
100644
(file)
--- a/
src/users.c
+++ b/
src/users.c
@@
-27,8
+27,8
@@
#include "collectd.h"
#include "collectd.h"
-#include "common.h"
#include "plugin.h"
#include "plugin.h"
+#include "utils/common/common.h"
#if HAVE_STATGRAB_H
#include <statgrab.h>
#if HAVE_STATGRAB_H
#include <statgrab.h>
@@
-44,14
+44,10
@@
#endif
static void users_submit(gauge_t value) {
#endif
static void users_submit(gauge_t value) {
- value_t values[1];
value_list_t vl = VALUE_LIST_INIT;
value_list_t vl = VALUE_LIST_INIT;
- values[0].gauge = value;
-
- vl.values = values;
+ vl.values = &(value_t){.gauge = value};
vl.values_len = 1;
vl.values_len = 1;
- sstrncpy(vl.host, hostname_g, sizeof(vl.host));
sstrncpy(vl.plugin, "users", sizeof(vl.plugin));
sstrncpy(vl.type, "users", sizeof(vl.plugin));
sstrncpy(vl.plugin, "users", sizeof(vl.plugin));
sstrncpy(vl.type, "users", sizeof(vl.plugin));
@@
-105,7
+101,7
@@
static int users_read(void) {
us = sg_get_user_stats();
#endif
if (us == NULL)
us = sg_get_user_stats();
#endif
if (us == NULL)
- return
(-1)
;
+ return
-1
;
users_submit((gauge_t)
#if HAVE_LIBSTATGRAB_0_90
users_submit((gauge_t)
#if HAVE_LIBSTATGRAB_0_90
@@
-119,7
+115,7
@@
static int users_read(void) {
#error "No applicable input method."
#endif
#error "No applicable input method."
#endif
- return
(0)
;
+ return
0
;
} /* int users_read */
void module_register(void) {
} /* int users_read */
void module_register(void) {