Skip to content

Commit 0cb88a6

Browse files
Apply suggestions from code review
1 parent 179ceba commit 0cb88a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/clusters/thermostat-server/thermostat-server-atomic.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ void ThermostatAttrAccess::ResetAtomicWrite(EndpointId endpoint)
336336
atomicWriteSession.state = AtomicWriteState::Closed;
337337
atomicWriteSession.endpointId = endpoint;
338338
atomicWriteSession.nodeId = ScopedNodeId();
339-
atomicWriteSession.attributeIds.Alloc(0);
339+
atomicWriteSession.attributeIds.Free();
340340
}
341341

342342
ScopedNodeId ThermostatAttrAccess::GetAtomicWriteOriginatorScopedNodeId(const EndpointId endpoint)
@@ -540,8 +540,8 @@ void ThermostatAttrAccess::CommitAtomicWrite(CommandHandler * commandObj, const
540540
case Schedules::Id:
541541
break;
542542
default:
543-
commandObj->AddStatus(commandPath, Status::InvalidInState);
544-
return;
543+
// Not reachable, since we returned in this situation above.
544+
break;
545545
}
546546
attributeStatus.statusCode = to_underlying(statusCode);
547547
if (statusCode != Status::Success)

0 commit comments

Comments
 (0)