From 1badaf741a2d6b9fba8d6b1f6337724d2d0e785e Mon Sep 17 00:00:00 2001 From: Zhenhua Zhang Date: Wed, 7 Jul 2010 08:42:23 +0800 Subject: test-server: Refactor set_raw_mode Rename variable 'options' to 'ti' and use sizeof(ti). --- gatchat/test-server.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gatchat/test-server.c') diff --git a/gatchat/test-server.c b/gatchat/test-server.c index 2911978f..49012dc3 100644 --- a/gatchat/test-server.c +++ b/gatchat/test-server.c @@ -846,13 +846,13 @@ static void server_destroy(gpointer user) static void set_raw_mode(int fd) { - struct termios options; + struct termios ti; - memset(&options, 0, sizeof(struct termios)); - tcgetattr(fd, &options); + memset(&ti, 0, sizeof(ti)); + tcgetattr(fd, &ti); tcflush(fd, TCIOFLUSH); - cfmakeraw(&options); - tcsetattr(fd, TCSANOW, &options); + cfmakeraw(&ti); + tcsetattr(fd, TCSANOW, &ti); } static gboolean create_tty(const char *modem_path) -- cgit v1.2.3