From 23a607b6f248ffaab94e49da7671aaf127e20834 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Sun, 8 Sep 2024 11:48:33 -0700 Subject: [PATCH] [Raspi] Fix crash on RP4 when add-local-bridge (#35468) * [Raspi] Fix crash on RP4 when add-local-bridge * Restyled by clang-format --------- Co-authored-by: Restyled.io --- .../commands/pairing/PairingCommand.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/fabric-admin/commands/pairing/PairingCommand.h b/examples/fabric-admin/commands/pairing/PairingCommand.h index 293c369b25227e..73e717b93757c2 100644 --- a/examples/fabric-admin/commands/pairing/PairingCommand.h +++ b/examples/fabric-admin/commands/pairing/PairingCommand.h @@ -250,7 +250,7 @@ class PairingCommand : public CHIPCommand, const PairingNetworkType mNetworkType; const chip::Dnssd::DiscoveryFilterType mFilterType; Command::AddressWithInterface mRemoteAddr; - NodeId mNodeId; + NodeId mNodeId = chip::kUndefinedNodeId; chip::Optional mTimeout; chip::Optional mDiscoverOnce; chip::Optional mUseOnlyOnNetworkDiscovery; @@ -272,18 +272,18 @@ class PairingCommand : public CHIPCommand, TypedComplexArgument> mComplex_DSTOffsets; - uint16_t mRemotePort; - uint16_t mDiscriminator; - uint32_t mSetupPINCode; - uint16_t mIndex; + uint16_t mRemotePort = 0; + uint16_t mDiscriminator = 0; + uint32_t mSetupPINCode = 0; + uint16_t mIndex = 0; chip::ByteSpan mOperationalDataset; chip::ByteSpan mSSID; chip::ByteSpan mPassword; - char * mOnboardingPayload; - uint64_t mDiscoveryFilterCode; - char * mDiscoveryFilterInstanceName; + char * mOnboardingPayload = nullptr; + uint64_t mDiscoveryFilterCode = 0; + char * mDiscoveryFilterInstanceName = nullptr; - bool mDeviceIsICD; + bool mDeviceIsICD = false; uint8_t mRandomGeneratedICDSymmetricKey[chip::Crypto::kAES_CCM128_Key_Length]; // For unpair