svn commit: r298203 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Mon Apr 18 11:39:42 UTC 2016


Author: tuexen
Date: Mon Apr 18 11:39:41 2016
New Revision: 298203
URL: https://svnweb.freebsd.org/changeset/base/298203

Log:
  Fix signed/unsigned warnings.

Modified:
  head/sys/netinet/sctp_indata.c
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_indata.c
==============================================================================
--- head/sys/netinet/sctp_indata.c	Mon Apr 18 10:37:50 2016	(r298202)
+++ head/sys/netinet/sctp_indata.c	Mon Apr 18 11:39:41 2016	(r298203)
@@ -2598,7 +2598,7 @@ sctp_process_data(struct mbuf **mm, int 
 			} else {
 				clen = sizeof(struct sctp_idata_chunk);
 			}
-			if ((size_t)chk_length < clen) {
+			if (chk_length < clen) {
 				/*
 				 * Need to send an abort since we had a
 				 * invalid data chunk.

Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c	Mon Apr 18 10:37:50 2016	(r298202)
+++ head/sys/netinet/sctp_output.c	Mon Apr 18 11:39:41 2016	(r298203)
@@ -7186,7 +7186,8 @@ sctp_move_to_outqueue(struct sctp_tcb *s
 	struct sctp_tmit_chunk *chk;
 	struct sctp_data_chunk *dchkh = NULL;
 	struct sctp_idata_chunk *ndchkh = NULL;
-	uint32_t to_move, length, leading;
+	uint32_t to_move, length;
+	int leading;
 	uint8_t rcv_flags = 0;
 	uint8_t some_taken;
 	uint8_t send_lock_up = 0;
@@ -7491,9 +7492,9 @@ dont_do_it:
 		atomic_subtract_int(&sp->length, to_move);
 	}
 	if (stcb->asoc.idata_supported == 0) {
-		leading = (int)sizeof(struct sctp_data_chunk);
+		leading = sizeof(struct sctp_data_chunk);
 	} else {
-		leading = (int)sizeof(struct sctp_idata_chunk);
+		leading = sizeof(struct sctp_idata_chunk);
 	}
 	if (M_LEADINGSPACE(chk->data) < leading) {
 		/* Not enough room for a chunk header, get some */


More information about the svn-src-all mailing list