mirror of
https://github.com/zhaojh329/rtty.git
synced 2026-02-27 09:53:17 +08:00
Remove unused variable
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
+1
-2
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user