Hush a few MSVC warnings (#65)

This commit is contained in:
Dmitri Tikhonov 2019-02-01 15:16:24 -05:00 committed by LiteSpeed Tech
parent 5d081270b9
commit 03fb93526e
3 changed files with 4 additions and 1 deletions

View file

@ -278,6 +278,7 @@ block_write (struct data_block *block, unsigned block_off,
unsigned set, bit, n_full_sets, n;
uint64_t mask;
assert(block_off < DB_DATA_SIZE);
if (data_sz > DB_DATA_SIZE - block_off)
data_sz = DB_DATA_SIZE - block_off;

View file

@ -2496,6 +2496,8 @@ create_delayed_streams (struct full_conn *conn)
avail = conn->fc_cfg.max_streams_out - stream_count;
if (conn->fc_n_delayed_streams < avail)
avail = conn->fc_n_delayed_streams;
if (avail == 0)
return;
new_streams = malloc(sizeof(new_streams[0]) * avail);
if (!new_streams)

View file

@ -161,7 +161,7 @@ find_and_set_next_priority (struct stream_prio_iter *iter)
if (iter->spi_set[ set ])
break;
if (set == 4)
if (set >= 4)
{
//SPI_DEBUG("%s: cannot find any", __func__);
return -1;