Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nivi-apple committed Aug 23, 2024
1 parent 739a3d7 commit ef99585
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,10 @@ CHIP_ERROR ThermostatAttrAccess::AppendPendingPreset(Thermostat::Delegate * dele
// Before adding this preset to the pending presets, if the expected length of the pending presets' list
// exceeds the total number of presets supported, return RESOURCE_EXHAUSTED. Note that the preset has not been appended yet.

uint8_t numberOfPendingPresets = CountNumberOfPendingPresets(delegate);

// Increment number of pending presets by 1 to account for this preset.
uint8_t totalExpectedCount = CountNumberOfPendingPresets(delegate) + 1;
uint8_t totalExpectedCount = numberOfPendingPresets + 1;

uint8_t numberOfPresetsSupported = delegate->GetNumberOfPresets();

Expand Down

0 comments on commit ef99585

Please sign in to comment.