diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 5aa7577606cc13..188bfe7379dd2e 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -618,8 +618,7 @@ void Server::GenerateShutDownEvent() void Server::PostFactoryResetEvent() { - DeviceLayer::ChipDeviceEvent event; - event.Type = DeviceLayer::DeviceEventType::kFactoryReset; + DeviceLayer::ChipDeviceEvent event{ .Type = DeviceLayer::DeviceEventType::kFactoryReset }; CHIP_ERROR error = DeviceLayer::PlatformMgr().PostEvent(&event); if (error != CHIP_NO_ERROR)