svn commit: r299533 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Thu May 12 14:41:54 UTC 2016
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);
More information about the svn-src-all
mailing list