Skip to content

Commit e43f0d7

Browse files
authored
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: #44500 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent 5ac5aca commit e43f0d7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/crypto/crypto_clienthello-inl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ inline void ClientHelloParser::Reset() {
5151

5252
inline void ClientHelloParser::Start(ClientHelloParser::OnHelloCb onhello_cb,
5353
ClientHelloParser::OnEndCb onend_cb,
54-
void* onend_arg) {
54+
void* cb_arg) {
5555
if (!IsEnded())
5656
return;
5757
Reset();
@@ -61,7 +61,7 @@ inline void ClientHelloParser::Start(ClientHelloParser::OnHelloCb onhello_cb,
6161
state_ = kWaiting;
6262
onhello_cb_ = onhello_cb;
6363
onend_cb_ = onend_cb;
64-
cb_arg_ = onend_arg;
64+
cb_arg_ = cb_arg;
6565
}
6666

6767
inline void ClientHelloParser::End() {

src/crypto/crypto_clienthello.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ClientHelloParser {
6666
void Parse(const uint8_t* data, size_t avail);
6767

6868
inline void Reset();
69-
inline void Start(OnHelloCb onhello_cb, OnEndCb onend_cb, void* onend_arg);
69+
inline void Start(OnHelloCb onhello_cb, OnEndCb onend_cb, void* cb_arg);
7070
inline void End();
7171
inline bool IsPaused() const;
7272
inline bool IsEnded() const;

0 commit comments

Comments
 (0)