nghttpx: Set 0 to next_proto_len explicitly for clarification

This commit is contained in:
Tatsuhiro Tsujikawa 2016-04-08 23:03:42 +09:00
parent ea5f424dec
commit 2a59c832c1
2 changed files with 2 additions and 2 deletions

View File

@ -519,7 +519,7 @@ void ClientHandler::signal_reset_upstream_conn_rtimer() {
int ClientHandler::validate_next_proto() {
const unsigned char *next_proto = nullptr;
unsigned int next_proto_len;
unsigned int next_proto_len = 0;
// First set callback for catch all cases
on_read_ = &ClientHandler::upstream_read;

View File

@ -1424,7 +1424,7 @@ int Http2Session::connection_made() {
if (ssl_ctx_) {
const unsigned char *next_proto = nullptr;
unsigned int next_proto_len;
unsigned int next_proto_len = 0;
SSL_get0_next_proto_negotiated(conn_.tls.ssl, &next_proto, &next_proto_len);
for (int i = 0; i < 2; ++i) {
if (next_proto) {