We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 739a3d7 commit ef99585Copy full SHA for ef99585
src/app/clusters/thermostat-server/thermostat-server-presets.cpp
@@ -405,8 +405,10 @@ CHIP_ERROR ThermostatAttrAccess::AppendPendingPreset(Thermostat::Delegate * dele
405
// Before adding this preset to the pending presets, if the expected length of the pending presets' list
406
// exceeds the total number of presets supported, return RESOURCE_EXHAUSTED. Note that the preset has not been appended yet.
407
408
+ uint8_t numberOfPendingPresets = CountNumberOfPendingPresets(delegate);
409
+
410
// Increment number of pending presets by 1 to account for this preset.
- uint8_t totalExpectedCount = CountNumberOfPendingPresets(delegate) + 1;
411
+ uint8_t totalExpectedCount = numberOfPendingPresets + 1;
412
413
uint8_t numberOfPresetsSupported = delegate->GetNumberOfPresets();
414
0 commit comments