From c47c6ca3992c74489700cda44443ec29c3cb3b13 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Wed, 16 Sep 2020 16:14:23 -0400 Subject: fix style --- include/olm/account.hh | 3 +-- src/account.cpp | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/include/olm/account.hh b/include/olm/account.hh index 82bba27..826b26d 100644 --- a/include/olm/account.hh +++ b/include/olm/account.hh @@ -129,8 +129,7 @@ struct Account { ); /** The number of random bytes needed to generate a fallback key. */ - std::size_t generate_fallback_key_random_length( - ); + std::size_t generate_fallback_key_random_length(); /** Generates a new fallback key. Returns std::size_t(-1) on error. If the * number of random bytes is too small then last_error will be diff --git a/src/account.cpp b/src/account.cpp index a747677..e84a540 100644 --- a/src/account.cpp +++ b/src/account.cpp @@ -38,11 +38,17 @@ olm::OneTimeKey const * olm::Account::lookup_key( } } if (current_fallback_key.published - && olm::array_equal(current_fallback_key.key.public_key.public_key, public_key.public_key)) { + && olm::array_equal( + current_fallback_key.key.public_key.public_key, public_key.public_key + ) + ) { return ¤t_fallback_key; } if (prev_fallback_key.published - && olm::array_equal(prev_fallback_key.key.public_key.public_key, public_key.public_key)) { + && olm::array_equal( + prev_fallback_key.key.public_key.public_key, public_key.public_key + ) + ) { return &prev_fallback_key; } return 0; @@ -62,11 +68,17 @@ std::size_t olm::Account::remove_key( // check if the key is a fallback key, to avoid returning an error, but // don't actually remove it if (current_fallback_key.published - && olm::array_equal(current_fallback_key.key.public_key.public_key, public_key.public_key)) { + && olm::array_equal( + current_fallback_key.key.public_key.public_key, public_key.public_key + ) + ) { return current_fallback_key.id; } if (prev_fallback_key.published - && olm::array_equal(prev_fallback_key.key.public_key.public_key, public_key.public_key)) { + && olm::array_equal( + prev_fallback_key.key.public_key.public_key, public_key.public_key + ) + ) { return prev_fallback_key.id; } return std::size_t(-1); -- cgit v1.2.3