From 067e50a3c35ad6d5b5175a71fdcc364b36ebc2a9 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 6d0d4f7114d608..aadf5e970d8d3b 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 @@ -106,8 +106,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) {