Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

agent: backhaul_manager: get_media_type(): return true on success #1107

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3439,7 +3439,7 @@ bool backhaul_manager::get_media_type(const std::string &interface_name,
if ((std::get<0>(tuple) == radio_info.frequency_band) &&
(std::get<1>(tuple) == radio_info.max_bandwidth)) {
media_type = std::get<2>(tuple);

result = true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we just return true in these cases?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the multiple exit points vs. single exit point discussion, which I'm not sure we put to a vote.

break;
}
}
Expand Down