summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
Diffstat (limited to 'node')
-rw-r--r--node/CertificateOfOwnership.hpp2
-rw-r--r--node/NetworkConfig.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/node/CertificateOfOwnership.hpp b/node/CertificateOfOwnership.hpp
index 5adee6c0..ffb0f74b 100644
--- a/node/CertificateOfOwnership.hpp
+++ b/node/CertificateOfOwnership.hpp
@@ -194,7 +194,7 @@ public:
{
unsigned int p = startAt;
- memset(this,0,sizeof(CertificateOfOwnership));
+ *this = CertificateOfOwnership();
_networkId = b.template at<uint64_t>(p); p += 8;
_ts = b.template at<uint64_t>(p); p += 8;
diff --git a/node/NetworkConfig.cpp b/node/NetworkConfig.cpp
index 828724f9..8be72008 100644
--- a/node/NetworkConfig.cpp
+++ b/node/NetworkConfig.cpp
@@ -203,7 +203,7 @@ bool NetworkConfig::fromDictionary(const Dictionary<ZT_NETWORKCONFIG_DICT_CAPACI
Buffer<ZT_NETWORKCONFIG_DICT_CAPACITY> *tmp = new Buffer<ZT_NETWORKCONFIG_DICT_CAPACITY>();
try {
- memset(this,0,sizeof(NetworkConfig));
+ *this = NetworkConfig();
// Fields that are always present, new or old
this->networkId = d.getUI(ZT_NETWORKCONFIG_DICT_KEY_NETWORK_ID,0);