Skip to content

Commit

Permalink
Fix some other shorten-64-to-32 casting error found by MSVC (64bits)
Browse files Browse the repository at this point in the history
  • Loading branch information
alagoutte committed Aug 3, 2014
1 parent 4bbb417 commit 6c71889
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/nghttp2_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ ssize_t nghttp2_bufs_len(nghttp2_bufs *bufs)

static ssize_t bufs_avail(nghttp2_bufs *bufs)
{
return (ssize_t)nghttp2_buf_avail(&bufs->cur->buf) +
(bufs->chunk_length - bufs->offset) * (bufs->max_chunk - bufs->chunk_used);
return (ssize_t)(nghttp2_buf_avail(&bufs->cur->buf) +
(bufs->chunk_length - bufs->offset) * (bufs->max_chunk - bufs->chunk_used));
}

static int bufs_alloc_chain(nghttp2_bufs *bufs)
Expand Down
2 changes: 1 addition & 1 deletion lib/nghttp2_hd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,7 @@ ssize_t nghttp2_hd_inflate_hd(nghttp2_hd_inflater *inflater,

goto fail;
}
return in - first;
return (ssize_t)(in - first);

fail:
DEBUGF(fprintf(stderr, "inflatehd: error return %zd\n", rv));
Expand Down

0 comments on commit 6c71889

Please sign in to comment.