Module: check_mk
Branch: master
Commit: 440e71f04cb9bc3afd7e1f2daa4348d7abac8f4f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=440e71f04cb9bc…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue May 9 12:12:41 2017 +0200
Make clang-tidy happy again.
Change-Id: I0a0caa9598a2083dd0f60957ce1a29e81823e467
---
livestatus/src/TableHostGroups.cc | 15 +++++++--------
livestatus/src/TableServiceGroups.cc | 15 +++++++--------
2 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/livestatus/src/TableHostGroups.cc b/livestatus/src/TableHostGroups.cc
index 8ec8fe5..9c96e6a 100644
--- a/livestatus/src/TableHostGroups.cc
+++ b/livestatus/src/TableHostGroups.cc
@@ -202,14 +202,13 @@ bool TableHostGroups::isAuthorized(Row row, contact *ctc) {
}
}
return false;
- } else {
- // TODO(sp) Need an iterator here, "strict" means "all_of"
- for (hostsmember *mem = rowData<hostgroup>(row)->members;
- mem != nullptr; mem = mem->next) {
- if (!has_contact(mem)) {
- return false;
- }
+ }
+ // TODO(sp) Need an iterator here, "strict" means "all_of"
+ for (hostsmember *mem = rowData<hostgroup>(row)->members; mem != nullptr;
+ mem = mem->next) {
+ if (!has_contact(mem)) {
+ return false;
}
- return true;
}
+ return true;
}
diff --git a/livestatus/src/TableServiceGroups.cc b/livestatus/src/TableServiceGroups.cc
index b4598fc..9c5211e 100644
--- a/livestatus/src/TableServiceGroups.cc
+++ b/livestatus/src/TableServiceGroups.cc
@@ -165,14 +165,13 @@ bool TableServiceGroups::isAuthorized(Row row, contact *ctc) {
}
}
return false;
- } else {
- // TODO(sp) Need an iterator here, "strict" means "all_of"
- for (servicesmember *mem = rowData<servicegroup>(row)->members;
- mem != nullptr; mem = mem->next) {
- if (!has_contact(mem)) {
- return false;
- }
+ }
+ // TODO(sp) Need an iterator here, "strict" means "all_of"
+ for (servicesmember *mem = rowData<servicegroup>(row)->members;
+ mem != nullptr; mem = mem->next) {
+ if (!has_contact(mem)) {
+ return false;
}
- return true;
}
+ return true;
}