From 12b2d977ab8e7c0ce4fc1853dea22ff2dbf2bab3 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 22 Apr 2024 18:00:16 +0000 Subject: [PATCH] quic: address recent coverity warnings Signed-off-by: Michael Dawson PR-URL: https://github.com/nodejs/node/pull/52647 Reviewed-By: Vladimir Morozov Reviewed-By: James M Snell --- src/quic/data.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/quic/data.cc b/src/quic/data.cc index b01e10ad05707b..4ae48945928953 100644 --- a/src/quic/data.cc +++ b/src/quic/data.cc @@ -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; }