diff options
author | Chris Akritidis <43294513+cakrit@users.noreply.github.com> | 2019-05-27 10:30:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-27 10:30:15 +0200 |
commit | 9410b63ee9168c80e6b0aedd8abe4ee0944d8047 (patch) | |
tree | 18b80702d368ce343a7acfd52bfa99d35bade6aa /database/rrdhost.c | |
parent | 9f532f4981bdc4455a3115e580fe4014ff928efb (diff) |
Remove unecessary 2nd call of get_system_info at startup (#6128)
Diffstat (limited to 'database/rrdhost.c')
-rw-r--r-- | database/rrdhost.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/database/rrdhost.c b/database/rrdhost.c index 51e24e587e..d33e7af8f5 100644 --- a/database/rrdhost.c +++ b/database/rrdhost.c @@ -811,11 +811,9 @@ restart_after_removal: // ---------------------------------------------------------------------------- // RRDHOST - set system info from environment variables -int rrdhost_set_system_info_variable(RRDHOST *host, struct rrdhost_system_info *system_info, char *name, char *value) { +int rrdhost_set_system_info_variable(struct rrdhost_system_info *system_info, char *name, char *value) { int res = 0; - if(host) rrdhost_wrlock(host); - if(!strcmp(name, "NETDATA_SYSTEM_OS_NAME")){ freez(system_info->os_name); system_info->os_name = strdupz(value); @@ -872,7 +870,5 @@ int rrdhost_set_system_info_variable(RRDHOST *host, struct rrdhost_system_info * res = 1; } - if(host) rrdhost_unlock(host); - return res; } |