summaryrefslogtreecommitdiff
path: root/epan/nghttp2/nghttp2_buf.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2015-09-23 22:16:46 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2015-09-24 05:48:20 +0000
commitfea2e4aaf84aa73d716070643225134b184dd545 (patch)
treebd6c098cbbfb5ee6e8db81f8ad787e1325bc51de /epan/nghttp2/nghttp2_buf.c
parentc66233c7783aa08a5312addabe0dc64271852cfb (diff)
downloadwireshark-fea2e4aaf84aa73d716070643225134b184dd545.tar.gz
NGHTTP2: Update to 1.3.3
Change-Id: Id52d04859d61ffc720791cf90294cac4b1915a28 Reviewed-on: https://code.wireshark.org/review/10629 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/nghttp2/nghttp2_buf.c')
-rw-r--r--epan/nghttp2/nghttp2_buf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/nghttp2/nghttp2_buf.c b/epan/nghttp2/nghttp2_buf.c
index 6bba48cc20..f6018bca46 100644
--- a/epan/nghttp2/nghttp2_buf.c
+++ b/epan/nghttp2/nghttp2_buf.c
@@ -244,9 +244,9 @@ void nghttp2_bufs_seek_last_present(nghttp2_bufs *bufs) {
}
}
-ssize_t nghttp2_bufs_len(nghttp2_bufs *bufs) {
+size_t nghttp2_bufs_len(nghttp2_bufs *bufs) {
nghttp2_buf_chain *ci;
- ssize_t len;
+ size_t len;
len = 0;
for (ci = bufs->head; ci; ci = ci->next) {
@@ -256,10 +256,10 @@ ssize_t nghttp2_bufs_len(nghttp2_bufs *bufs) {
return len;
}
-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));
+static size_t bufs_avail(nghttp2_bufs *bufs) {
+ return 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) {
@@ -301,7 +301,7 @@ int nghttp2_bufs_add(nghttp2_bufs *bufs, const void *data, size_t len) {
nghttp2_buf *buf;
const uint8_t *p;
- if (bufs_avail(bufs) < (ssize_t)len) {
+ if (bufs_avail(bufs) < len) {
return NGHTTP2_ERR_BUFFER_ERROR;
}
@@ -310,7 +310,7 @@ int nghttp2_bufs_add(nghttp2_bufs *bufs, const void *data, size_t len) {
while (len) {
buf = &bufs->cur->buf;
- nwrite = nghttp2_min((size_t)nghttp2_buf_avail(buf), len);
+ nwrite = nghttp2_min(nghttp2_buf_avail(buf), len);
if (nwrite == 0) {
rv = bufs_alloc_chain(bufs);
if (rv != 0) {