summaryrefslogtreecommitdiffstats
path: root/demos/http3/ossl-nghttp3-demo.c
diff options
context:
space:
mode:
Diffstat (limited to 'demos/http3/ossl-nghttp3-demo.c')
-rw-r--r--demos/http3/ossl-nghttp3-demo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/demos/http3/ossl-nghttp3-demo.c b/demos/http3/ossl-nghttp3-demo.c
index b1cbd1abf9..e74dc565a2 100644
--- a/demos/http3/ossl-nghttp3-demo.c
+++ b/demos/http3/ossl-nghttp3-demo.c
@@ -53,12 +53,12 @@ static int on_recv_data(nghttp3_conn *h3conn, int64_t stream_id,
const uint8_t *data, size_t datalen,
void *conn_user_data, void *stream_user_data)
{
- ssize_t wr;
+ size_t wr;
/* HTTP response body data - write it to stdout. */
while (datalen > 0) {
wr = fwrite(data, 1, datalen, stdout);
- if (wr < 0)
+ if (ferror(stdout))
return 1;
data += wr;