Skip to content

Commit fc17b80

Browse files
tniessenRafaelGSS
authored andcommitted
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 <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
1 parent 6fe189b commit fc17b80

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/crypto/crypto_clienthello-inl.h

+2-2
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

+1-1
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)