Skip to content

Commit ef99585

Browse files
committedAug 23, 2024··
Minor fix
1 parent 739a3d7 commit ef99585

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/app/clusters/thermostat-server/thermostat-server-presets.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,10 @@ CHIP_ERROR ThermostatAttrAccess::AppendPendingPreset(Thermostat::Delegate * dele
405405
// Before adding this preset to the pending presets, if the expected length of the pending presets' list
406406
// exceeds the total number of presets supported, return RESOURCE_EXHAUSTED. Note that the preset has not been appended yet.
407407

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

411413
uint8_t numberOfPresetsSupported = delegate->GetNumberOfPresets();
412414

0 commit comments

Comments
 (0)
Please sign in to comment.