test-server: Refactor set_raw_mode
authorZhenhua Zhang <zhenhua.zhang@intel.com>
Wed, 7 Jul 2010 00:42:23 +0000 (08:42 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 7 Jul 2010 01:30:32 +0000 (22:30 -0300)
Rename variable 'options' to 'ti' and use sizeof(ti).

gatchat/test-server.c

index 2911978..49012dc 100644 (file)
@@ -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)