diff --git a/ncat/ncat_posix.c b/ncat/ncat_posix.c index acd790305..bdf3e6445 100644 --- a/ncat/ncat_posix.c +++ b/ncat/ncat_posix.c @@ -201,7 +201,7 @@ void netexec(struct fdinfo *info, char *cmdexec) crlf_state = 0; for (;;) { fd_set fds; - int r, n_r, n_w; + int r, n_r; FD_ZERO(&fds); FD_SET(info->fd, &fds); @@ -221,7 +221,7 @@ void netexec(struct fdinfo *info, char *cmdexec) n_r = ncat_recv(info, buf, sizeof(buf), &pending); if (n_r <= 0) goto loop_end; - n_w = write_loop(child_stdin[1], buf, n_r); + write_loop(child_stdin[1], buf, n_r); } while (pending); } if (FD_ISSET(child_stdout[0], &fds)) { @@ -234,7 +234,7 @@ void netexec(struct fdinfo *info, char *cmdexec) if (fix_line_endings((char *) buf, &n_r, &crlf, &crlf_state)) wbuf = crlf; } - n_w = ncat_send(info, wbuf, n_r); + ncat_send(info, wbuf, n_r); if (crlf != NULL) free(crlf); } diff --git a/ncat/ncat_proxy.c b/ncat/ncat_proxy.c index 43baf2edf..6c5bd745b 100644 --- a/ncat/ncat_proxy.c +++ b/ncat/ncat_proxy.c @@ -470,11 +470,11 @@ static int handle_connect(struct socket_buffer *client_sock, while (!socket_errno() || socket_errno() == EINTR) { char buf[DEFAULT_TCP_BUF_LEN]; - int len, rc, numready; + int len, rc; r = m; - numready = fselect(maxfd + 1, &r, NULL, NULL, NULL); + fselect(maxfd + 1, &r, NULL, NULL, NULL); zmem(buf, sizeof(buf));