Remove unused variable

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
Jianhui Zhao
2020-02-10 21:55:00 +08:00
parent 566440bdc7
commit b3e6f82011
3 changed files with 1 additions and 10 deletions
+1 -2
View File
@@ -89,8 +89,7 @@ int main(int argc, char **argv)
.host = "localhost",
.port = 5912,
.loop = loop,
.sock = -1,
.sock_file = -1
.sock = -1
};
int option_index;
int c;
-6
View File
@@ -231,14 +231,8 @@ static void rtty_exit(struct rtty *rtty)
close(rtty->sock);
rtty->sock = -1;
if (rtty->sock_file > -1) {
close(rtty->sock_file);
rtty->sock_file = -1;
}
ev_io_stop(rtty->loop, &rtty->ior);
ev_io_stop(rtty->loop, &rtty->iow);
ev_io_stop(rtty->loop, &rtty->iof);
buffer_free(&rtty->rb);
buffer_free(&rtty->wb);
-2
View File
@@ -62,7 +62,6 @@ struct rtty {
const char *host;
int port;
int sock;
int sock_file;
const char *devid;
const char *token; /* authorization token */
const char *description;
@@ -72,7 +71,6 @@ struct rtty {
struct buffer wb;
struct ev_io iow;
struct ev_io ior;
struct ev_io iof;
struct ev_timer tmr;
struct ev_loop *loop;
ev_tstamp active;