projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
write_tsdb: enable TCP keepalive on network socket
[collectd.git]
/
src
/
multimeter.c
diff --git
a/src/multimeter.c
b/src/multimeter.c
index
6953750
..
02fe1ad
100644
(file)
--- a/
src/multimeter.c
+++ b/
src/multimeter.c
@@
-23,6
+23,7
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "common.h"
#include "plugin.h"
@@
-148,20
+149,18
@@
static int multimeter_read_value(double *value)
static int multimeter_init (void)
{
static int multimeter_init (void)
{
- int i;
char device[] = "/dev/ttyS ";
char device[] = "/dev/ttyS ";
- for (i = 0; i < 10; i++)
+ for (i
nt i
= 0; i < 10; i++)
{
device[strlen(device)-1] = i + '0';
if ((fd = open(device, O_RDWR | O_NOCTTY)) != -1)
{
{
device[strlen(device)-1] = i + '0';
if ((fd = open(device, O_RDWR | O_NOCTTY)) != -1)
{
- struct termios tios;
+ struct termios tios
= { 0 }
;
int rts = TIOCM_RTS;
double value;
int rts = TIOCM_RTS;
double value;
- memset (&tios, 0, sizeof (tios));
tios.c_cflag = B1200 | CS7 | CSTOPB | CREAD | CLOCAL;
tios.c_iflag = IGNBRK | IGNPAR;
tios.c_oflag = 0;
tios.c_cflag = B1200 | CS7 | CSTOPB | CREAD | CLOCAL;
tios.c_iflag = IGNBRK | IGNPAR;
tios.c_oflag = 0;