From c6bd918344c2a138cd809148e1d22f296d86f389 Mon Sep 17 00:00:00 2001 From: "powwow@askgustav.com" Date: Tue, 19 Mar 2019 00:05:37 +0100 Subject: remove an unused variable and function diff --git a/tcp.c b/tcp.c index d5a6be8..de54a87 100644 --- a/tcp.c +++ b/tcp.c @@ -134,7 +134,6 @@ int tcp_connect(const char *addr, int port) struct addrinfo *host_info; struct addrinfo addrinfo; struct sockaddr_in6 address; - int must_free = 0; int err, newtcp_fd; status(1); @@ -175,7 +174,6 @@ int tcp_connect(const char *addr, int port) gai_strerror(gai)); return -1; } - must_free = 1; if (opt_info) tty_puts("found.\n"); break; @@ -289,20 +287,6 @@ int tcp_unIAC(char *buffer, int len) } /* - * the reverse step: protect ASCII 255 as IAC IAC - * the dest buffer is assumed to be big enough to hold the whole data - */ -static int tcp_addIAC(char *dest, char *txt, int len) -{ - char *s = dest; - while (len-- > 0) { - if ((*s++ = *txt++) == (char)(byte)IAC) - *s++ = (char)(byte)IAC; - } - return s - dest; -} - -/* * read a maximum of size chars from remote host * using the telnet protocol. return chars read. */ @@ -755,7 +739,7 @@ int tcp_find(char *id) */ void tcp_show(void) { - int i = tcp_count+tcp_attachcount; + int i = tcp_count + tcp_attachcount; PRINTF("#%s connection%s opened%c\n", i ? "The following" : "No", i==1 ? " is" : "s are", i ? ':' : '.'); -- cgit v0.10.2