diff options
author | Tobias Nießen <tniessen@tnie.de> | 2022-09-04 17:24:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-04 17:24:10 +0300 |
commit | e43f0d7ae81c70f1ad817eb8dc5522eb5d533d7a (patch) | |
tree | c22360dbf3acba0c95f9332f703a2e3705fe2675 /src | |
parent | 5ac5acae5d9d40d0c2167e10d504db2a56632bf5 (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.h | 4 | ||||
-rw-r--r-- | src/crypto/crypto_clienthello.h | 2 |
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; |