Date: Wed, 18 Oct 2017 21:08:35 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324730 - head/sys/netinet Message-ID: <201710182108.v9IL8Zkx046838@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Wed Oct 18 21:08:35 2017 New Revision: 324730 URL: https://svnweb.freebsd.org/changeset/base/324730 Log: Fix a signed/unsigned warning. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Wed Oct 18 20:17:44 2017 (r324729) +++ head/sys/netinet/sctp_indata.c Wed Oct 18 21:08:35 2017 (r324730) @@ -2641,10 +2641,11 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o struct sctp_association *asoc; int num_chunks = 0; /* number of control chunks processed */ int stop_proc = 0; - int chk_length, break_flag, last_chunk; + int break_flag, last_chunk; int abort_flag = 0, was_a_gap; struct mbuf *m; uint32_t highest_tsn; + uint16_t chk_length; /* set the rwnd */ sctp_set_rwnd(stcb, &stcb->asoc); @@ -2739,7 +2740,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o } if ((ch->chunk_type == SCTP_DATA) || (ch->chunk_type == SCTP_IDATA)) { - int clen; + uint16_t clen; if (ch->chunk_type == SCTP_DATA) { clen = sizeof(struct sctp_data_chunk); @@ -2754,7 +2755,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - snprintf(msg, sizeof(msg), "%s chunk of length %d", + snprintf(msg, sizeof(msg), "%s chunk of length %u", ch->chunk_type == SCTP_DATA ? "DATA" : "I-DATA", chk_length); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); @@ -2844,7 +2845,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; - snprintf(msg, sizeof(msg), "Chunk of length %d", + snprintf(msg, sizeof(msg), "Chunk of length %u", chk_length); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_20;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710182108.v9IL8Zkx046838>