diff options
author | powwow@askgustav.com <powwow@askgustav.com> | 2019-03-18 23:05:37 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2019-04-23 20:37:05 (GMT) |
commit | c6bd918344c2a138cd809148e1d22f296d86f389 (patch) | |
tree | 3af37147318084bcf03b170fdffa94948a43138b | |
parent | 304a722c426f47a461dc88c4493f800c0690b29b (diff) | |
download | powwow-c6bd918344c2a138cd809148e1d22f296d86f389.zip powwow-c6bd918344c2a138cd809148e1d22f296d86f389.tar.gz powwow-c6bd918344c2a138cd809148e1d22f296d86f389.tar.bz2 |
remove an unused variable and function
-rw-r--r-- | tcp.c | 18 |
1 files changed, 1 insertions, 17 deletions
@@ -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 ? ':' : '.'); |