From e1091611da39eefeeb9d707c0de5bf5124f81be5 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 25 Mar 2019 12:41:59 -0700 Subject: [PATCH] More mem*() stuff... --- node/CertificateOfOwnership.hpp | 2 +- node/NetworkConfig.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/node/CertificateOfOwnership.hpp b/node/CertificateOfOwnership.hpp index 5adee6c03..ffb0f74ba 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(p); p += 8; _ts = b.template at(p); p += 8; diff --git a/node/NetworkConfig.cpp b/node/NetworkConfig.cpp index 828724f99..8be720081 100644 --- a/node/NetworkConfig.cpp +++ b/node/NetworkConfig.cpp @@ -203,7 +203,7 @@ bool NetworkConfig::fromDictionary(const Dictionary *tmp = new Buffer(); 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);