Author: tuexen
Date: Thu May 12 14:41:53 2016
New Revision: 299533
URL: https://svnweb.freebsd.org/changeset/base/299533
Log:
Use a format string in snprintf() for consistency.
This was reported by Radek Malcic when using the userland stack in
combination with MinGW.
MFC after: 1 week
Modified:
head/sys/netinet/sctp_indata.c
Modified: head/sys/netinet/sctp_indata.c
==============================================================================
--- head/sys/netinet/sctp_indata.c Thu May 12 12:13:28 2016
(r299532)
+++ head/sys/netinet/sctp_indata.c Thu May 12 14:41:53 2016
(r299533)
@@ -2566,7 +2566,7 @@ sctp_process_data(struct mbuf **mm, int
struct mbuf *op_err;
char msg[SCTP_DIAG_INFO_LEN];
- snprintf(msg, sizeof(msg), "I-DATA chunk received when
DATA was negotiated");
+ snprintf(msg, sizeof(msg), "%s", "I-DATA chunk received
when DATA was negotiated");
op_err =
sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg);
stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA
+ SCTP_LOC_18;
sctp_abort_an_association(inp, stcb, op_err,
SCTP_SO_NOT_LOCKED);
@@ -2577,7 +2577,7 @@ sctp_process_data(struct mbuf **mm, int
struct mbuf *op_err;
char msg[SCTP_DIAG_INFO_LEN];
- snprintf(msg, sizeof(msg), "DATA chunk received when
I-DATA was negotiated");
+ snprintf(msg, sizeof(msg), "%s", "DATA chunk received
when I-DATA was negotiated");
op_err =
sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg);
stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA
+ SCTP_LOC_19;
sctp_abort_an_association(inp, stcb, op_err,
SCTP_SO_NOT_LOCKED);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"