Skip to content

Commit f019838

Browse files
committed
Initialize CID::cid_ class member in constructor
1 parent b395420 commit f019838

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/quic/cid.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace node::quic {
1313
// ============================================================================
1414
// CID
1515

16-
CID::CID() : ptr_(&cid_) {
16+
CID::CID() : cid_{}, ptr_(&cid_) {
1717
cid_.datalen = 0;
1818
}
1919

@@ -24,7 +24,7 @@ CID::CID(const uint8_t* data, size_t len) : CID() {
2424
ngtcp2_cid_init(&cid_, data, len);
2525
}
2626

27-
CID::CID(const ngtcp2_cid* cid) : ptr_(cid) {
27+
CID::CID(const ngtcp2_cid* cid) : cid_{}, ptr_(cid) {
2828
CHECK_NOT_NULL(cid);
2929
DCHECK_LE(cid->datalen, kMaxLength);
3030
}

0 commit comments

Comments
 (0)