diff options
author | Shawn Willden <swillden@google.com> | 2016-01-28 13:16:47 -0700 |
---|---|---|
committer | Shawn Willden <swillden@google.com> | 2016-01-28 13:17:47 -0700 |
commit | 8dd7e83399cea94d7b3a3cec2e5005cee5ea443f (patch) | |
tree | 45a120aa5665aec10e172883ce279c2befd1ae5e /asymmetric_key.cpp | |
parent | da1a18074fe94a04d77fe00c3fa25852ef56ecdc (diff) | |
download | keymaster-8dd7e83399cea94d7b3a3cec2e5005cee5ea443f.tar.gz |
Change struct initialization to make gcc happy.
Clang likes the as-is code just fine, but gcc barfs, and I can't force
use of clang in Trusty, so, we make gcc happy.
Change-Id: I9cc0bcbcec9a75447c356ebc8861db0816d22990
Diffstat (limited to 'asymmetric_key.cpp')
-rw-r--r-- | asymmetric_key.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/asymmetric_key.cpp b/asymmetric_key.cpp index e0af5a5..02a7f15 100644 --- a/asymmetric_key.cpp +++ b/asymmetric_key.cpp @@ -161,7 +161,9 @@ static bool copy_attestation_chain(const KeymasterContext& context, if (!allocate_cert_chain(attest_key_chain->entry_count + 1, chain, error)) return false; - chain->entries[0] = {}; // Leave empty for the leaf certificate. + chain->entries[0].data = nullptr; // Leave empty for the leaf certificate. + chain->entries[0].data_length = 0; + for (size_t i = 0; i < attest_key_chain->entry_count; ++i) { chain->entries[i + 1] = attest_key_chain->entries[i]; attest_key_chain->entries[i].data = nullptr; |