Fix signed/unsigned warnings.

This commit is contained in:
tuexen 2016-04-18 11:39:41 +00:00
parent d47609db9b
commit 20ff6f8501
2 changed files with 5 additions and 4 deletions

View File

@ -2598,7 +2598,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
} else { } else {
clen = sizeof(struct sctp_idata_chunk); 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 * Need to send an abort since we had a
* invalid data chunk. * invalid data chunk.

View File

@ -7186,7 +7186,8 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb,
struct sctp_tmit_chunk *chk; struct sctp_tmit_chunk *chk;
struct sctp_data_chunk *dchkh = NULL; struct sctp_data_chunk *dchkh = NULL;
struct sctp_idata_chunk *ndchkh = 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 rcv_flags = 0;
uint8_t some_taken; uint8_t some_taken;
uint8_t send_lock_up = 0; uint8_t send_lock_up = 0;
@ -7491,9 +7492,9 @@ dont_do_it:
atomic_subtract_int(&sp->length, to_move); atomic_subtract_int(&sp->length, to_move);
} }
if (stcb->asoc.idata_supported == 0) { if (stcb->asoc.idata_supported == 0) {
leading = (int)sizeof(struct sctp_data_chunk); leading = sizeof(struct sctp_data_chunk);
} else { } else {
leading = (int)sizeof(struct sctp_idata_chunk); leading = sizeof(struct sctp_idata_chunk);
} }
if (M_LEADINGSPACE(chk->data) < leading) { if (M_LEADINGSPACE(chk->data) < leading) {
/* Not enough room for a chunk header, get some */ /* Not enough room for a chunk header, get some */