Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2022-09-04 17:24:10 +0300
committerRafaelGSS <rafael.nunu@hotmail.com>2022-09-07 19:25:08 +0300
commitfc17b808c9c282e242e54ec1bfaf3191f00b0210 (patch)
treec5dc4d710c376df52a7b4984f69d88336807fd78 /src
parent6fe189b62a1010a6c9e86e8a43cb01ef230cadde (diff)
src: rename misleading arg in ClientHelloParser
Despite being named onend_arg, the pointer is passed both to the onend_cb and to the onhello_cb. Rename it to cb_arg, which matches the name of the class field cb_arg_. PR-URL: https://github.com/nodejs/node/pull/44500 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/crypto/crypto_clienthello-inl.h4
-rw-r--r--src/crypto/crypto_clienthello.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/crypto/crypto_clienthello-inl.h b/src/crypto/crypto_clienthello-inl.h
index 4f133e83832..1b8a0c00c30 100644
--- a/src/crypto/crypto_clienthello-inl.h
+++ b/src/crypto/crypto_clienthello-inl.h
@@ -51,7 +51,7 @@ inline void ClientHelloParser::Reset() {
inline void ClientHelloParser::Start(ClientHelloParser::OnHelloCb onhello_cb,
ClientHelloParser::OnEndCb onend_cb,
- void* onend_arg) {
+ void* cb_arg) {
if (!IsEnded())
return;
Reset();
@@ -61,7 +61,7 @@ inline void ClientHelloParser::Start(ClientHelloParser::OnHelloCb onhello_cb,
state_ = kWaiting;
onhello_cb_ = onhello_cb;
onend_cb_ = onend_cb;
- cb_arg_ = onend_arg;
+ cb_arg_ = cb_arg;
}
inline void ClientHelloParser::End() {
diff --git a/src/crypto/crypto_clienthello.h b/src/crypto/crypto_clienthello.h
index 0d3bf60f96b..3af08bc6475 100644
--- a/src/crypto/crypto_clienthello.h
+++ b/src/crypto/crypto_clienthello.h
@@ -66,7 +66,7 @@ class ClientHelloParser {
void Parse(const uint8_t* data, size_t avail);
inline void Reset();
- inline void Start(OnHelloCb onhello_cb, OnEndCb onend_cb, void* onend_arg);
+ inline void Start(OnHelloCb onhello_cb, OnEndCb onend_cb, void* cb_arg);
inline void End();
inline bool IsPaused() const;
inline bool IsEnded() const;