diff options
author | Mauro <you@example.com> | 2021-06-30 07:57:22 +0000 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2021-07-06 16:16:04 +0000 |
commit | 08233d44a6cfde878d7e10bca38ae935ed1c8fd5 (patch) | |
tree | 7ecc534d55bdc7e8dd15ecab084720910bcdf4d9 /libtransport/src/core/manifest_format_fixed.cc | |
parent | 147ba39bed26887f5eba84757e2463ab8e370a9a (diff) |
[HICN-713] Transport Library Major Refactoring 2
Co-authored-by: Luca Muscariello <muscariello@ieee.org>
Co-authored-by: Michele Papalini <micpapal@cisco.com>
Co-authored-by: Olivier Roques <oroques+fdio@cisco.com>
Co-authored-by: Giulio Grassi <gigrassi@cisco.com>
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2
Diffstat (limited to 'libtransport/src/core/manifest_format_fixed.cc')
-rw-r--r-- | libtransport/src/core/manifest_format_fixed.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libtransport/src/core/manifest_format_fixed.cc b/libtransport/src/core/manifest_format_fixed.cc index 7076a4c90..11d4a56cb 100644 --- a/libtransport/src/core/manifest_format_fixed.cc +++ b/libtransport/src/core/manifest_format_fixed.cc @@ -34,7 +34,7 @@ FixedManifestEncoder::FixedManifestEncoder(Packet &packet, current_entry_(0), signature_size_(signature_size) { if (clear) { - memset(manifest_header_, 0, sizeof(*manifest_header_)); + *manifest_header_ = {0}; } } @@ -51,7 +51,7 @@ FixedManifestEncoder &FixedManifestEncoder::clearImpl() { packet_.trimEnd(sizeof(ManifestHeader) + manifest_header_->number_of_entries * sizeof(ManifestEntry)); current_entry_ = 0; - memset(manifest_header_, 0, sizeof(*manifest_header_)); + *manifest_header_ = {0}; return *this; } @@ -85,8 +85,8 @@ FixedManifestEncoder &FixedManifestEncoder::setBaseNameImpl( FixedManifestEncoder &FixedManifestEncoder::addSuffixAndHashImpl( uint32_t suffix, const auth::CryptoHash &hash) { - auto _hash = hash.getDigest<std::uint8_t>(); - addSuffixHashBytes(suffix, _hash.data(), _hash.length()); + auto _hash = hash.getDigest(); + addSuffixHashBytes(suffix, _hash.data(), _hash.size()); return *this; } |