diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:22 +0000 |
commit | c21c3b0befeb46a51b6bf3758ffa30813bea0ff0 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /libnetdata/health/health.c | |
parent | Adding upstream version 1.43.2. (diff) | |
download | netdata-upstream/1.44.3.tar.xz netdata-upstream/1.44.3.zip |
Adding upstream version 1.44.3.upstream/1.44.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | libnetdata/health/health.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libnetdata/health/health.c b/libnetdata/health/health.c index f2dc46e3d..2b3b8f7d6 100644 --- a/libnetdata/health/health.c +++ b/libnetdata/health/health.c @@ -29,9 +29,13 @@ void health_silencers_add(SILENCER *silencer) { // Add the created instance to the linked list in silencers silencer->next = silencers->silencers; silencers->silencers = silencer; - netdata_log_debug(D_HEALTH, "HEALTH command API: Added silencer %s:%s:%s:%s", silencer->alarms, - silencer->charts, silencer->contexts, silencer->hosts - ); + netdata_log_debug( + D_HEALTH, + "HEALTH command API: Added silencer %s:%s:%s:%s", + silencer->alarms, + silencer->charts, + silencer->contexts, + silencer->hosts); } /** @@ -71,10 +75,6 @@ SILENCER *health_silencers_addparam(SILENCER *silencer, char *key, char *value) (hash == hash_host && !strcasecmp(key, HEALTH_HOST_KEY)) ) { silencer = create_silencer(); - if(!silencer) { - netdata_log_error("Cannot add a new silencer to Netdata"); - return NULL; - } } } @@ -160,10 +160,10 @@ int health_silencers_json_read_callback(JSON_ENTRY *e) * @return It returns 0 on success and -1 otherwise */ int health_initialize_global_silencers() { - silencers = mallocz(sizeof(SILENCERS)); - silencers->all_alarms=0; - silencers->stype=STYPE_NONE; - silencers->silencers=NULL; + silencers = mallocz(sizeof(SILENCERS)); + silencers->all_alarms = 0; + silencers->stype = STYPE_NONE; + silencers->silencers = NULL; return 0; } |