Skip to content

Commit

Permalink
quic: address recent coverity warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Dawson <[email protected]>
PR-URL: #52647
Reviewed-By: Vladimir Morozov <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
mhdawson authored and aduh95 committed Apr 30, 2024
1 parent c64a1a3 commit d086ab4
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit d086ab4

Please sign in to comment.