rs

FTDI serial communication program
git clone git://git.2f30.org/rs.git
Log | Files | Refs | README | LICENSE

commit 1a1ac9b8e42750115a28e6bd2e3a9df73f763197
parent 13d8aba85e070354e5ad9b3ffac5d0992fc17a96
Author: sin <sin@2f30.org>
Date:   Sat Nov 16 10:01:37 +0000

No need to use memcpy() to save the tty state

Diffstat:
rs.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/rs.c b/rs.c @@ -2,7 +2,6 @@ #include <errno.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> #include <termios.h> #include <unistd.h> #include <signal.h> @@ -31,7 +30,7 @@ static int ttyinit(void) { tcgetattr(STDIN_FILENO, &tio); - memcpy(&saved_tio, &tio, sizeof(struct termios)); + saved_tio = tio; cfmakeraw(&tio); tio.c_cc[VMIN] = 0; tio.c_cc[VTIME] = 0;