diff --git a/src/app/clusters/scenes-server/ExtensionFieldSetsImpl.cpp b/src/app/clusters/scenes-server/ExtensionFieldSetsImpl.cpp index 489e6788be77f9..08eff27fe54c65 100644 --- a/src/app/clusters/scenes-server/ExtensionFieldSetsImpl.cpp +++ b/src/app/clusters/scenes-server/ExtensionFieldSetsImpl.cpp @@ -24,8 +24,6 @@ namespace scenes { CHIP_ERROR ExtensionFieldSetsImpl::Serialize(TLV::TLVWriter & writer, TLV::Tag structTag) const { - TLV::TLVType structureContainer; - ReturnErrorOnFailure(writer.StartContainer(structTag, TLV::kTLVType_Structure, structureContainer)); TLV::TLVType arrayContainer; ReturnErrorOnFailure( writer.StartContainer(TLV::ContextTag(TagEFS::kFieldSetArrayContainer), TLV::kTLVType_Array, arrayContainer)); @@ -34,16 +32,11 @@ CHIP_ERROR ExtensionFieldSetsImpl::Serialize(TLV::TLVWriter & writer, TLV::Tag s ReturnErrorOnFailure(mFieldSets[i].Serialize(writer)); } - ReturnErrorOnFailure(writer.EndContainer(arrayContainer)); - return writer.EndContainer(structureContainer); + return writer.EndContainer(arrayContainer); } CHIP_ERROR ExtensionFieldSetsImpl::Deserialize(TLV::TLVReader & reader, TLV::Tag structTag) { - TLV::TLVType structureContainer; - ReturnErrorOnFailure(reader.Next(TLV::kTLVType_Structure, structTag)); - ReturnErrorOnFailure(reader.EnterContainer(structureContainer)); - TLV::TLVType arrayContainer; ReturnErrorOnFailure(reader.Next(TLV::kTLVType_Array, TLV::ContextTag(TagEFS::kFieldSetArrayContainer))); ReturnErrorOnFailure(reader.EnterContainer(arrayContainer)); @@ -69,8 +62,7 @@ CHIP_ERROR ExtensionFieldSetsImpl::Deserialize(TLV::TLVReader & reader, TLV::Tag return err; } - ReturnErrorOnFailure(reader.ExitContainer(arrayContainer)); - return reader.ExitContainer(structureContainer); + return reader.ExitContainer(arrayContainer); } void ExtensionFieldSetsImpl::Clear() diff --git a/src/app/clusters/scenes-server/SceneTableImpl.cpp b/src/app/clusters/scenes-server/SceneTableImpl.cpp index afb5295edf4868..7481461fb8d7d8 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.cpp +++ b/src/app/clusters/scenes-server/SceneTableImpl.cpp @@ -99,7 +99,7 @@ struct EndpointSceneCount : public PersistentData