Skip to content

Commit d2ebaaa

Browse files
committed
quic: address recent coverity warnings
Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: nodejs#52647 Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent f7e73cd commit d2ebaaa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/quic/data.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,14 @@ void QuicError::MemoryInfo(MemoryTracker* tracker) const {
285285
QuicError QuicError::ForTransport(error_code code, std::string reason) {
286286
QuicError error(std::move(reason));
287287
ngtcp2_ccerr_set_transport_error(
288-
&error.error_, code, error.reason_c_str(), reason.length());
288+
&error.error_, code, error.reason_c_str(), error.reason().length());
289289
return error;
290290
}
291291

292292
QuicError QuicError::ForApplication(error_code code, std::string reason) {
293293
QuicError error(std::move(reason));
294294
ngtcp2_ccerr_set_application_error(
295-
&error.error_, code, error.reason_c_str(), reason.length());
295+
&error.error_, code, error.reason_c_str(), error.reason().length());
296296
return error;
297297
}
298298

@@ -307,14 +307,14 @@ QuicError QuicError::ForIdleClose(std::string reason) {
307307
QuicError QuicError::ForNgtcp2Error(int code, std::string reason) {
308308
QuicError error(std::move(reason));
309309
ngtcp2_ccerr_set_liberr(
310-
&error.error_, code, error.reason_c_str(), reason.length());
310+
&error.error_, code, error.reason_c_str(), error.reason().length());
311311
return error;
312312
}
313313

314314
QuicError QuicError::ForTlsAlert(int code, std::string reason) {
315315
QuicError error(std::move(reason));
316316
ngtcp2_ccerr_set_tls_alert(
317-
&error.error_, code, error.reason_c_str(), reason.length());
317+
&error.error_, code, error.reason_c_str(), error.reason().length());
318318
return error;
319319
}
320320

0 commit comments

Comments
 (0)