Skip to content

Commit

Permalink
Remove unused variable
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <[email protected]>
  • Loading branch information
zhaojh329 committed Feb 10, 2020
1 parent 566440b commit b3e6f82
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
3 changes: 1 addition & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 0 additions & 6 deletions src/rtty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions src/rtty.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit b3e6f82

Please sign in to comment.