From 0bea1d43df9546316b6cf237b24c26b358ef7958 Mon Sep 17 00:00:00 2001 From: doru91 Date: Tue, 17 Feb 2026 15:55:07 +0200 Subject: [PATCH] Fix unit variable (#43165) * Fix unit variable Signed-off-by: Doru-Cristian Gucea * Restyled by clang-format --------- Signed-off-by: Doru-Cristian Gucea Co-authored-by: Restyled.io (cherry picked from commit d5b71858e5a2a1c2225a153ffc3217a252614eea) --- .../thread-network-diagnostics-provider.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.cpp b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.cpp index 504cd279843b2c..1bf97506657f52 100644 --- a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.cpp +++ b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.cpp @@ -108,8 +108,8 @@ CHIP_ERROR WriteThreadNetworkDiagnosticAttributeToTlv(AttributeId attributeId, a case Attributes::RoutingRole::Id: { using ThreadNetworkDiagnostics::RoutingRoleEnum; - RoutingRoleEnum routingRole; - otDeviceRole otRole = otThreadGetDeviceRole(otInst); + RoutingRoleEnum routingRole = RoutingRoleEnum::kUnspecified; + otDeviceRole otRole = otThreadGetDeviceRole(otInst); if (otRole == OT_DEVICE_ROLE_DISABLED) {