Skip to content

Commit

Permalink
crypto: move field initialization to class
Browse files Browse the repository at this point in the history
PR-URL: #23610
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
  • Loading branch information
Diana Holland authored and addaleax committed Oct 20, 2018
1 parent f9c893a commit 932cb33
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
9 changes: 1 addition & 8 deletions src/node_crypto_clienthello-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,7 @@ inline ClientHelloParser::ClientHelloParser()
: state_(kEnded),
onhello_cb_(nullptr),
onend_cb_(nullptr),
cb_arg_(nullptr),
session_size_(0),
session_id_(nullptr),
servername_size_(0),
servername_(nullptr),
ocsp_request_(0),
tls_ticket_size_(0),
tls_ticket_(nullptr) {
cb_arg_(nullptr) {
Reset();
}

Expand Down
20 changes: 10 additions & 10 deletions src/node_crypto_clienthello.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,16 @@ class ClientHelloParser {
OnHelloCb onhello_cb_;
OnEndCb onend_cb_;
void* cb_arg_;
size_t frame_len_;
size_t body_offset_;
size_t extension_offset_;
uint8_t session_size_;
const uint8_t* session_id_;
uint16_t servername_size_;
const uint8_t* servername_;
uint8_t ocsp_request_;
uint16_t tls_ticket_size_;
const uint8_t* tls_ticket_;
size_t frame_len_ = 0;
size_t body_offset_ = 0;
size_t extension_offset_ = 0;
uint8_t session_size_ = 0;
const uint8_t* session_id_ = nullptr;
uint16_t servername_size_ = 0;
const uint8_t* servername_ = nullptr;
uint8_t ocsp_request_ = 0;
uint16_t tls_ticket_size_ = -1;
const uint8_t* tls_ticket_ = nullptr;
};

} // namespace crypto
Expand Down

0 comments on commit 932cb33

Please sign in to comment.