Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quic: address recent coverity warnings #52647

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/quic/data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,14 @@ void QuicError::MemoryInfo(MemoryTracker* tracker) const {
QuicError QuicError::ForTransport(error_code code, std::string reason) {
QuicError error(std::move(reason));
ngtcp2_ccerr_set_transport_error(
&error.error_, code, error.reason_c_str(), reason.length());
&error.error_, code, error.reason_c_str(), error.reason().length());
return error;
}

QuicError QuicError::ForApplication(error_code code, std::string reason) {
QuicError error(std::move(reason));
ngtcp2_ccerr_set_application_error(
&error.error_, code, error.reason_c_str(), reason.length());
&error.error_, code, error.reason_c_str(), error.reason().length());
return error;
}

Expand All @@ -307,14 +307,14 @@ QuicError QuicError::ForIdleClose(std::string reason) {
QuicError QuicError::ForNgtcp2Error(int code, std::string reason) {
QuicError error(std::move(reason));
ngtcp2_ccerr_set_liberr(
&error.error_, code, error.reason_c_str(), reason.length());
&error.error_, code, error.reason_c_str(), error.reason().length());
return error;
}

QuicError QuicError::ForTlsAlert(int code, std::string reason) {
QuicError error(std::move(reason));
ngtcp2_ccerr_set_tls_alert(
&error.error_, code, error.reason_c_str(), reason.length());
&error.error_, code, error.reason_c_str(), error.reason().length());
return error;
}

Expand Down
Loading