From 19cf6c5a27233fe378c83f0f5d3a9ef97a156bc1 Mon Sep 17 00:00:00 2001 From: shgutte <102281713+shgutte@users.noreply.github.com> Date: Fri, 22 Nov 2024 23:19:09 +0530 Subject: [PATCH] Adds changes according to comment --- .../refrigerator-app/silabs/src/EventHandlerLibShell.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/refrigerator-app/silabs/src/EventHandlerLibShell.cpp b/examples/refrigerator-app/silabs/src/EventHandlerLibShell.cpp index f923d5ec90..212b2ac8d8 100644 --- a/examples/refrigerator-app/silabs/src/EventHandlerLibShell.cpp +++ b/examples/refrigerator-app/silabs/src/EventHandlerLibShell.cpp @@ -114,7 +114,7 @@ CHIP_ERROR RefrigeratorDoorEventHandler(int argc, char ** argv) RefrigeratorAlarmEventData * data = Platform::New(); data->eventId = Events::Notify::Id; - data->doorState = static_cast(atoi(argv[0])); + data->doorState = static_cast(value); DeviceLayer::PlatformMgr().ScheduleWork(EventWorkerFunction, reinterpret_cast(data)); @@ -172,7 +172,7 @@ void EventWorkerFunction(intptr_t context) ChipLogError(Zcl, "Invalid Event Id %s, line %d", __func__, __LINE__); break; } - // Free memory - Platform::Delete(data); } + // Free memory + Platform::Delete(data); }