Fix signed/unsigned warnings.

This commit is contained in:
Michael Tuexen 2016-04-18 11:39:41 +00:00
parent 9ca014f67b
commit f8ee69bf81
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 {
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.

View File

@ -7186,7 +7186,8 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb,
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 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb,
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 */