comparison tcp-accept.c @ 1256:506f7681d0f8 coverity

merge up to date
author Matt Johnston <matt@ucc.asn.au>
date Tue, 15 Mar 2016 22:45:43 +0800
parents 888e3d17e962
children 750ec4ec4cbe
comparison
equal deleted inserted replaced
1219:84cf9062718d 1256:506f7681d0f8
119 char* errstring = NULL; 119 char* errstring = NULL;
120 120
121 TRACE(("enter listen_tcpfwd")) 121 TRACE(("enter listen_tcpfwd"))
122 122
123 /* first we try to bind, so don't need to do so much cleanup on failure */ 123 /* first we try to bind, so don't need to do so much cleanup on failure */
124 snprintf(portstring, sizeof(portstring), "%d", tcpinfo->listenport); 124 snprintf(portstring, sizeof(portstring), "%u", tcpinfo->listenport);
125 125
126 nsocks = dropbear_listen(tcpinfo->listenaddr, portstring, socks, 126 nsocks = dropbear_listen(tcpinfo->listenaddr, portstring, socks,
127 DROPBEAR_MAX_SOCKS, &errstring, &ses.maxfd); 127 DROPBEAR_MAX_SOCKS, &errstring, &ses.maxfd);
128 if (nsocks < 0) { 128 if (nsocks < 0) {
129 dropbear_log(LOG_INFO, "TCP forward failed: %s", errstring); 129 dropbear_log(LOG_INFO, "TCP forward failed: %s", errstring);