Skip to content

Commit

Permalink
Remove extra else
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca committed Jan 23, 2025
1 parent 5c36f8c commit ec0298a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/data-model-providers/codegen/CodegenDataModelProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,11 @@ std::optional<DataModel::ActionReturnStatus> CodegenDataModelProvider::Invoke(co
{
return std::nullopt;
}
else
{
// If we reach here, it means this particular CommandHandlerInterface recognized the cluster but the command is invalid
// or cannot be processed.
handler->AddStatus(request.path, Protocols::InteractionModel::Status::InvalidCommand);
return std::nullopt;
}

// If we reach here, it means this particular CommandHandlerInterface recognized the cluster but the command is invalid
// or cannot be processed.
handler->AddStatus(request.path, Protocols::InteractionModel::Status::InvalidCommand);
return std::nullopt;
}

// Ember always sets the return in the handler
Expand Down

0 comments on commit ec0298a

Please sign in to comment.