summaryrefslogtreecommitdiffstats
path: root/database/rrdhost.c
diff options
context:
space:
mode:
authorvkalintiris <vasilis@netdata.cloud>2021-03-09 17:40:07 +0200
committerGitHub <noreply@github.com>2021-03-09 17:40:07 +0200
commit2ccc5a4d9ea781c2c20f9c47f56b2eea087de39a (patch)
tree10e8518b19b582af1d9a1ed204adfb8e64dbf6ca /database/rrdhost.c
parent71f5fcda20f6d3fcf9450a07156cda430716e250 (diff)
Use a parameter name that is not a reserved keyword in C++ (#10738)
Diffstat (limited to 'database/rrdhost.c')
-rw-r--r--database/rrdhost.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/database/rrdhost.c b/database/rrdhost.c
index 45c3146027..03bd8a2699 100644
--- a/database/rrdhost.c
+++ b/database/rrdhost.c
@@ -582,8 +582,8 @@ RRDHOST *rrdhost_find_or_create(
return host;
}
-inline int rrdhost_should_be_removed(RRDHOST *host, RRDHOST *protected, time_t now) {
- if(host != protected
+inline int rrdhost_should_be_removed(RRDHOST *host, RRDHOST *protected_host, time_t now) {
+ if(host != protected_host
&& host != localhost
&& rrdhost_flag_check(host, RRDHOST_FLAG_ORPHAN)
&& host->receiver
@@ -594,14 +594,14 @@ inline int rrdhost_should_be_removed(RRDHOST *host, RRDHOST *protected, time_t n
return 0;
}
-void rrdhost_cleanup_orphan_hosts_nolock(RRDHOST *protected) {
+void rrdhost_cleanup_orphan_hosts_nolock(RRDHOST *protected_host) {
time_t now = now_realtime_sec();
RRDHOST *host;
restart_after_removal:
rrdhost_foreach_write(host) {
- if(rrdhost_should_be_removed(host, protected, now)) {
+ if(rrdhost_should_be_removed(host, protected_host, now)) {
info("Host '%s' with machine guid '%s' is obsolete - cleaning up.", host->hostname, host->machine_guid);
if (rrdhost_flag_check(host, RRDHOST_FLAG_DELETE_ORPHAN_HOST)