chardev: ensure termios is fully initialized

valgrind on the test-char.c code reports that 'struct termios' contains
uninitialized memory.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20190211182442.8542-17-berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2019-02-11 18:24:42 +00:00 committed by Marc-André Lureau
parent 9baa6802fe
commit 211ef6c4b6

View File

@ -57,7 +57,7 @@ static void qmp_chardev_open_serial(Chardev *chr,
static void tty_serial_init(int fd, int speed,
int parity, int data_bits, int stop_bits)
{
struct termios tty;
struct termios tty = {0};
speed_t spd;
#if 0