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

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy