Minor error in serial_configure

Due to a minor mistake, only the first byte was being checked for
equality. Fixed it by changing position of parenthesis.

Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in>
This commit is contained in:
Venkatesh Shukla 2014-05-13 15:00:48 +05:30 committed by Jef Driesen
parent 48924123a6
commit 3001dda198

View File

@ -426,7 +426,7 @@ serial_configure (serial_t *device, int baudrate, int databits, int parity, int
SYSERROR (device->context, errno);
return -1;
}
if (memcmp (&tty, &active, sizeof (struct termios) != 0)) {
if (memcmp (&tty, &active, sizeof (struct termios)) != 0) {
ERROR (device->context, "Failed to set the terminal attributes.");
return -1;
}