Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Apr 2016 11:39:41 +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: r298203 - head/sys/netinet
Message-ID:  <201604181139.u3IBdfGj035180@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604181139.u3IBdfGj035180>