From: Florian Forster Date: Sat, 5 Dec 2015 22:37:16 +0000 (+0100) Subject: multimeter plugin: Initizliaze "struct termios". X-Git-Tag: collectd-5.5.1~23^2 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=00f7d2c68690ee66bf8729a9150835faa8b8730a multimeter plugin: Initizliaze "struct termios". CID: 38036 --- diff --git a/src/multimeter.c b/src/multimeter.c index 03608e6c..69537505 100644 --- a/src/multimeter.c +++ b/src/multimeter.c @@ -161,9 +161,10 @@ static int multimeter_init (void) 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_oflag = 0; tios.c_lflag = 0; tios.c_cc[VTIME] = 3; tios.c_cc[VMIN] = LINE_LENGTH;