Skip to content

Commit

Permalink
Return error if CopySpanToMutableSpan fails
Browse files Browse the repository at this point in the history
  • Loading branch information
nivi-apple committed Aug 20, 2024
1 parent fc04bb3 commit f6f131e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/thermostat/linux/thermostat-delegate-impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ CHIP_ERROR ThermostatDelegate::GetActivePresetHandle(DataModel::Nullable<Mutable
{
if (mActivePresetHandleDataSize != 0)
{
CopySpanToMutableSpan(ByteSpan(mActivePresetHandleData, mActivePresetHandleDataSize), activePresetHandle.Value());
ReturnErrorOnFailure(CopySpanToMutableSpan(ByteSpan(mActivePresetHandleData, mActivePresetHandleDataSize), activePresetHandle.Value()));
activePresetHandle.Value().reduce_size(mActivePresetHandleDataSize);
}
else
Expand Down

0 comments on commit f6f131e

Please sign in to comment.