aboutsummaryrefslogtreecommitdiff
path: root/lib/e2ee/qolmoutboundsession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/e2ee/qolmoutboundsession.cpp')
-rw-r--r--lib/e2ee/qolmoutboundsession.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/e2ee/qolmoutboundsession.cpp b/lib/e2ee/qolmoutboundsession.cpp
index 18af5569..56f78906 100644
--- a/lib/e2ee/qolmoutboundsession.cpp
+++ b/lib/e2ee/qolmoutboundsession.cpp
@@ -33,9 +33,9 @@ QOlmOutboundGroupSession::~QOlmOutboundGroupSession()
QOlmOutboundGroupSessionPtr QOlmOutboundGroupSession::create()
{
auto *olmOutboundGroupSession = olm_outbound_group_session(new uint8_t[olm_outbound_group_session_size()]);
- const auto randomLength = olm_init_outbound_group_session_random_length(olmOutboundGroupSession);
-
- if (olm_init_outbound_group_session(olmOutboundGroupSession,
+ if (const auto randomLength = olm_init_outbound_group_session_random_length(
+ olmOutboundGroupSession);
+ olm_init_outbound_group_session(olmOutboundGroupSession,
RandomBuffer(randomLength).bytes(),
randomLength)
== olm_error()) {