projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libcollectdclient: Implement server code.
[collectd.git]
/
src
/
ted.c
diff --git
a/src/ted.c
b/src/ted.c
index
4422ff9
..
fbfd95d
100644
(file)
--- a/
src/ted.c
+++ b/
src/ted.c
@@
-39,8
+39,7
@@
#include "common.h"
#include "plugin.h"
#include "common.h"
#include "plugin.h"
-#if HAVE_TERMIOS_H && HAVE_SYS_IOCTL_H && HAVE_MATH_H
-#include <math.h>
+#if HAVE_TERMIOS_H && HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#include <termios.h>
#else
#include <sys/ioctl.h>
#include <termios.h>
#else
@@
-229,14
+228,10
@@
static int ted_open_device(void) {
} /* int ted_open_device */
static void ted_submit(const char *type, double value) {
} /* int ted_open_device */
static void ted_submit(const char *type, double 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, "ted", sizeof(vl.plugin));
sstrncpy(vl.type, type, sizeof(vl.type));
sstrncpy(vl.plugin, "ted", sizeof(vl.plugin));
sstrncpy(vl.type, type, sizeof(vl.type));
@@
-304,5
+299,3
@@
void module_register(void) {
plugin_register_read("ted", ted_read);
plugin_register_shutdown("ted", ted_shutdown);
} /* void module_register */
plugin_register_read("ted", ted_read);
plugin_register_shutdown("ted", ted_shutdown);
} /* void module_register */
-
-/* vim: set sw=4 et : */