diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-04-30 19:52:00 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-05-04 06:55:30 +0200 |
commit | faece47c4706783e0460ed977390a44630b2d44c (patch) | |
tree | ec86896e9ef5d37816a454a72fa5c98246c0cf99 /src/key.cpp | |
parent | face9611093377e8502d91f2ff56f9319a56357c (diff) |
refactor: Avoid &foo[0] on C-Style arrays
This is confusing at best when parts of a class use the
redundant operators and other parts do not.
Diffstat (limited to 'src/key.cpp')
-rw-r--r-- | src/key.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/key.cpp b/src/key.cpp index 1e59b301cb..5666adebb8 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -293,7 +293,7 @@ bool CKey::Derive(CKey& keyChild, ChainCode &ccChild, unsigned int nChild, const bool CExtKey::Derive(CExtKey &out, unsigned int _nChild) const { out.nDepth = nDepth + 1; CKeyID id = key.GetPubKey().GetID(); - memcpy(&out.vchFingerprint[0], &id, 4); + memcpy(out.vchFingerprint, &id, 4); out.nChild = _nChild; return key.Derive(out.key, out.chaincode, _nChild, chaincode); } @@ -312,7 +312,7 @@ void CExtKey::SetSeed(const unsigned char *seed, unsigned int nSeedLen) { CExtPubKey CExtKey::Neuter() const { CExtPubKey ret; ret.nDepth = nDepth; - memcpy(&ret.vchFingerprint[0], &vchFingerprint[0], 4); + memcpy(ret.vchFingerprint, vchFingerprint, 4); ret.nChild = nChild; ret.pubkey = key.GetPubKey(); ret.chaincode = chaincode; |