value initialize introduction so that expiresAt defaults to zero

This commit is contained in:
Jeff Becker 2021-06-17 05:06:23 -04:00
parent 9f353238af
commit d45f0f8951
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
1 changed files with 2 additions and 2 deletions

View File

@ -158,10 +158,10 @@ namespace llarp
OutboundContext::ShiftIntroRouter(const RouterID r)
{
const auto now = Now();
Introduction selectedIntro;
Introduction selectedIntro{};
for (const auto& intro : currentIntroSet.intros)
{
if (intro.expiresAt > selectedIntro.expiresAt && intro.router != r)
if (intro.expiresAt > selectedIntro.expiresAt and intro.router != r)
{
selectedIntro = intro;
}