diff --git a/examples/chef/common/chef-rvc-operational-state-delegate.cpp b/examples/chef/common/chef-rvc-operational-state-delegate.cpp index 3b2c5a84e386a2..24a1b909fe2999 100644 --- a/examples/chef/common/chef-rvc-operational-state-delegate.cpp +++ b/examples/chef/common/chef-rvc-operational-state-delegate.cpp @@ -232,26 +232,27 @@ chip::Protocols::InteractionModel::Status chefRvcOperationalStateReadCallback(ch uint8_t * buffer, uint16_t maxReadLength) { chip::Protocols::InteractionModel::Status ret = chip::Protocols::InteractionModel::Status::Success; - chip::AttributeId attributeId = attributeMetadata->attributeId; - switch(attributeId) { - case chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id: { + chip::AttributeId attributeId = attributeMetadata->attributeId; + switch (attributeId) + { + case chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id: { - app::DataModel::Nullable currentPhase = gRvcOperationalStateInstance->GetCurrentPhase(); - if(currentPhase.IsNull()) - { - ret = chip::Protocols::InteractionModel::Status::UnsupportedAttribute; - break; - } - *buffer = currentPhase.Value(); - } - break; - case chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id: { - *buffer = gRvcOperationalStateInstance->GetCurrentOperationalState(); + app::DataModel::Nullable currentPhase = gRvcOperationalStateInstance->GetCurrentPhase(); + if (currentPhase.IsNull()) + { + ret = chip::Protocols::InteractionModel::Status::UnsupportedAttribute; + break; } + *buffer = currentPhase.Value(); + } + break; + case chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id: { + *buffer = gRvcOperationalStateInstance->GetCurrentOperationalState(); + } + break; + default: + ChipLogError(DeviceLayer, "Unsupported Attribute ID: %d", static_cast(attributeId)); break; - default: - ChipLogError(DeviceLayer, "Unsupported Attribute ID: %d", static_cast(attributeId)); - break; } return ret;