Skip to content

Commit

Permalink
Applied code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmelveilleux committed Jun 28, 2022
1 parent 676908e commit 0df7a72
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ CHIP_ERROR AccessControlAttribute::ReadAcl(AttributeValueEncoder & aEncoder)

CHIP_ERROR AccessControlAttribute::ReadExtension(AttributeValueEncoder & aEncoder)
{
#if SUPPORT_EXTENSION
auto & storage = Server::GetInstance().GetPersistentStorage();
DefaultStorageKeyAllocator key;

Expand All @@ -175,9 +174,6 @@ CHIP_ERROR AccessControlAttribute::ReadExtension(AttributeValueEncoder & aEncode
}
return CHIP_NO_ERROR;
});
#else
return CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute);
#endif
}

CHIP_ERROR AccessControlAttribute::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder)
Expand Down
7 changes: 4 additions & 3 deletions src/credentials/FabricTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ constexpr TLV::Tag kFabricLabelTag = TLV::ContextTag(1);
constexpr TLV::Tag kNextAvailableFabricIndexTag = TLV::ContextTag(0);
constexpr TLV::Tag kFabricIndicesTag = TLV::ContextTag(1);

// Tagsd for commit marker storage
// Tags for commit marker storage
constexpr TLV::Tag kMarkerFabricIndexTag = TLV::ContextTag(0);
constexpr TLV::Tag kMarkerIsAdditionTag = TLV::ContextTag(1);

constexpr size_t CommitMarkerContextTLVMaxSize()
{
// Add room for the future
return TLV::EstimateStructOverhead(sizeof(FabricIndex), sizeof(bool)) * 2;
// Add 2x uncommitted uint64_t to leave space for backwards/forwards
// versioning for this critical feature that runs at boot.
return TLV::EstimateStructOverhead(sizeof(FabricIndex), sizeof(bool), sizeof(uint64_t), sizeof(uint64_t));
}

constexpr size_t IndexInfoTLVMaxSize()
Expand Down
2 changes: 1 addition & 1 deletion src/credentials/FabricTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ class DLL_EXPORT FabricTable
void Shutdown();

/**
* @brief If `Init()` caused a Deted due to partial commit, the fabric index at play is returned.
* @brief If `Init()` caused a Delete due to partial commit, the fabric index at play is returned.
*
* Allows caller to schedule more clean-up. This is because at Init() time, none of the delegates
* are registered yet, so no other modules would learn of the removal.
Expand Down

0 comments on commit 0df7a72

Please sign in to comment.