Don't use ANSI string concatenation to misformat a string.

This commit is contained in:
Bruce Evans 1997-12-19 23:46:21 +00:00
parent d342b533eb
commit 592071e854
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=31882
3 changed files with 15 additions and 15 deletions

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
* $Id: tcp_input.c,v 1.65 1997/11/07 08:53:21 phk Exp $
* $Id: tcp_input.c,v 1.66 1997/11/20 20:04:49 wollman Exp $
*/
#include "opt_tcpdebug.h"
@ -385,10 +385,10 @@ tcp_input(m, iphlen)
char buf[4*sizeof "123"];
strcpy(buf, inet_ntoa(ti->ti_dst));
log(LOG_INFO, "Connection attempt to TCP %s:%d"
" from %s:%d\n",
buf, ntohs(ti->ti_dport),
inet_ntoa(ti->ti_src), ntohs(ti->ti_sport));
log(LOG_INFO,
"Connection attempt to TCP %s:%d from %s:%d\n",
buf, ntohs(ti->ti_dport), inet_ntoa(ti->ti_src),
ntohs(ti->ti_sport));
}
goto dropwithreset;
}

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
* $Id: tcp_input.c,v 1.65 1997/11/07 08:53:21 phk Exp $
* $Id: tcp_input.c,v 1.66 1997/11/20 20:04:49 wollman Exp $
*/
#include "opt_tcpdebug.h"
@ -385,10 +385,10 @@ tcp_input(m, iphlen)
char buf[4*sizeof "123"];
strcpy(buf, inet_ntoa(ti->ti_dst));
log(LOG_INFO, "Connection attempt to TCP %s:%d"
" from %s:%d\n",
buf, ntohs(ti->ti_dport),
inet_ntoa(ti->ti_src), ntohs(ti->ti_sport));
log(LOG_INFO,
"Connection attempt to TCP %s:%d from %s:%d\n",
buf, ntohs(ti->ti_dport), inet_ntoa(ti->ti_src),
ntohs(ti->ti_sport));
}
goto dropwithreset;
}

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95
* $Id: udp_usrreq.c,v 1.40 1997/09/14 03:10:40 peter Exp $
* $Id: udp_usrreq.c,v 1.41 1997/10/28 15:58:54 bde Exp $
*/
#include <sys/param.h>
@ -281,10 +281,10 @@ udp_input(m, iphlen)
char buf[4*sizeof "123"];
strcpy(buf, inet_ntoa(ip->ip_dst));
log(LOG_INFO, "Connection attempt to UDP %s:%d"
" from %s:%d\n",
buf, ntohs(uh->uh_dport),
inet_ntoa(ip->ip_src), ntohs(uh->uh_sport));
log(LOG_INFO,
"Connection attempt to UDP %s:%d from %s:%d\n",
buf, ntohs(uh->uh_dport), inet_ntoa(ip->ip_src),
ntohs(uh->uh_sport));
}
udpstat.udps_noport++;
if (m->m_flags & (M_BCAST | M_MCAST)) {