Skip to content

Commit

Permalink
Use a while instead of a pointless for
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed May 24, 2024
1 parent d3f4b63 commit d1d7dd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zm_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2682,7 +2682,7 @@ std::vector<std::shared_ptr<Monitor>> Monitor::LoadMonitors(const std::string &w
std::vector<std::shared_ptr<Monitor>> monitors;
monitors.reserve(n_monitors);

for (int i = 0; MYSQL_ROW dbrow = mysql_fetch_row(result); i++) {
while(MYSQL_ROW dbrow = mysql_fetch_row(result)) {
monitors.emplace_back(std::make_shared<Monitor>());
monitors.back()->Load(dbrow, true, purpose);
}
Expand Down

0 comments on commit d1d7dd7

Please sign in to comment.