aboutsummaryrefslogtreecommitdiff
path: root/lib/keyverificationsession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/keyverificationsession.cpp')
-rw-r--r--lib/keyverificationsession.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/keyverificationsession.cpp b/lib/keyverificationsession.cpp
index 3f76eac1..0f24c743 100644
--- a/lib/keyverificationsession.cpp
+++ b/lib/keyverificationsession.cpp
@@ -71,9 +71,9 @@ void KeyVerificationSession::init(milliseconds timeout)
QTimer::singleShot(timeout, this, [this] { cancelVerification(TIMEOUT); });
m_sas = olm_sas(new std::byte[olm_sas_size()]);
- auto randomSize = olm_create_sas_random_length(m_sas);
- auto random = getRandom(randomSize);
- olm_create_sas(m_sas, random.data(), randomSize);
+ const auto randomLength = olm_create_sas_random_length(m_sas);
+ auto random = getRandom(randomLength);
+ olm_create_sas(m_sas, random.data(), randomLength);
}
KeyVerificationSession::~KeyVerificationSession()