Commit 1b79114d authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Fix compiler warnings

parent ab634853
......@@ -383,9 +383,17 @@ static int error_reply(nghttp2_session *session,
}
return 0;
}
write(pipefd[1], ERROR_HTML, sizeof(ERROR_HTML) - 1);
rv = write(pipefd[1], ERROR_HTML, sizeof(ERROR_HTML) - 1);
close(pipefd[1]);
if(rv != sizeof(ERROR_HTML)) {
close(pipefd[0]);
return -1;
}
stream_data->fd = pipefd[0];
if(send_response(session, stream_data->stream_id, hdrs, ARRLEN(hdrs),
pipefd[0]) != 0) {
close(pipefd[0]);
......
......@@ -1941,7 +1941,7 @@ int nghttp2_hd_inflate_new(nghttp2_hd_inflater **inflater_ptr)
*inflater_ptr = malloc(sizeof(nghttp2_hd_inflater));
if(*inflater_ptr == NULL) {
return NULL;
return NGHTTP2_ERR_NOMEM;
}
return nghttp2_hd_inflate_init(*inflater_ptr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment