From 3001dda198c1c534ae7f37134466057a306a7e1a Mon Sep 17 00:00:00 2001 From: Venkatesh Shukla Date: Tue, 13 May 2014 15:00:48 +0530 Subject: [PATCH] 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 --- src/serial_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serial_posix.c b/src/serial_posix.c index e56eb0d..80334b0 100644 --- a/src/serial_posix.c +++ b/src/serial_posix.c @@ -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; }