diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-29 16:52:27 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-29 16:52:27 +0200 |
commit | ddc770d8f6da59b3788230412c9a40490594d0f3 (patch) | |
tree | 0acb0743a4082acf3db9a62d2e5b9e2a7e75f0cc /src/examples | |
parent | b53132950da3c6f75653306154b38f9f4af1ed21 (diff) | |
download | libmicrohttpd-ddc770d8f6da59b3788230412c9a40490594d0f3.tar.gz libmicrohttpd-ddc770d8f6da59b3788230412c9a40490594d0f3.zip |
fix example
Diffstat (limited to 'src/examples')
-rw-r--r-- | src/examples/http_chunked_compression.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/examples/http_chunked_compression.c b/src/examples/http_chunked_compression.c index 07fd00ec..f6baf0fd 100644 --- a/src/examples/http_chunked_compression.c +++ b/src/examples/http_chunked_compression.c | |||
@@ -109,6 +109,7 @@ read_cb (void *cls, uint64_t pos, char *mem, size_t size) | |||
109 | void *buf; | 109 | void *buf; |
110 | ssize_t ret; | 110 | ssize_t ret; |
111 | size_t offset; | 111 | size_t offset; |
112 | |||
112 | if (pos > SSIZE_MAX) | 113 | if (pos > SSIZE_MAX) |
113 | return MHD_CONTENT_READER_END_WITH_ERROR; | 114 | return MHD_CONTENT_READER_END_WITH_ERROR; |
114 | offset = (size_t) pos; | 115 | offset = (size_t) pos; |
@@ -121,7 +122,7 @@ read_cb (void *cls, uint64_t pos, char *mem, size_t size) | |||
121 | ret = MHD_CONTENT_READER_END_WITH_ERROR; | 122 | ret = MHD_CONTENT_READER_END_WITH_ERROR; |
122 | goto done; | 123 | goto done; |
123 | } | 124 | } |
124 | if (0 == size) | 125 | if (0 == ret) |
125 | { | 126 | { |
126 | ret = MHD_CONTENT_READER_END_OF_STREAM; | 127 | ret = MHD_CONTENT_READER_END_OF_STREAM; |
127 | goto done; | 128 | goto done; |