diff --git a/examples/chef/common/chef-channel-manager.cpp b/examples/chef/common/chef-channel-manager.cpp index 58a07edd730958..6077fd3d20b6f0 100644 --- a/examples/chef/common/chef-channel-manager.cpp +++ b/examples/chef/common/chef-channel-manager.cpp @@ -134,9 +134,9 @@ void ChefChannelManager::HandleChangeChannel(CommandResponseHelper 1) + if (totalMatchedChannels > 1) { response.status = chip::app::Clusters::Channel::ChannelStatusEnum::kMultipleMatches; helper.Success(response); } - else if (matchedChannels.size() == 0) + else if (totalMatchedChannels == 0) { // Error: Found no match response.status = chip::app::Clusters::Channel::ChannelStatusEnum::kNoMatches;