mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
quic: address recent coverity warnings
Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: https://github.com/nodejs/node/pull/52647 Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user