diff --git a/src/shrpx_quic_connection_handler.cc b/src/shrpx_quic_connection_handler.cc index 12ddca85..8daf6ef4 100644 --- a/src/shrpx_quic_connection_handler.cc +++ b/src/shrpx_quic_connection_handler.cc @@ -552,10 +552,10 @@ int QUICConnectionHandler::send_version_negotiation( const UpstreamAddr *faddr, uint32_t version, const uint8_t *ini_dcid, size_t ini_dcidlen, const uint8_t *ini_scid, size_t ini_scidlen, const Address &remote_addr, const Address &local_addr) { - std::array sv; - - sv[0] = generate_reserved_version(remote_addr, version); - sv[1] = NGTCP2_PROTO_VER_V1; + std::array sv{ + generate_reserved_version(remote_addr, version), + NGTCP2_PROTO_VER_V1, + }; std::array buf;