serial-port: shut valgrind up

This commit is contained in:
Dan Williams
2009-06-29 16:50:50 -04:00
parent 853af00142
commit ef1e709c12

View File

@@ -792,6 +792,7 @@ get_speed (MMSerialPort *self)
{
struct termios options;
memset (&options, 0, sizeof (struct termios));
tcgetattr (MM_SERIAL_PORT_GET_PRIVATE (self)->fd, &options);
return cfgetospeed (&options);
@@ -804,6 +805,7 @@ set_speed (MMSerialPort *self, speed_t speed)
int fd;
fd = MM_SERIAL_PORT_GET_PRIVATE (self)->fd;
memset (&options, 0, sizeof (struct termios));
tcgetattr (fd, &options);
cfsetispeed (&options, speed);