diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2019-10-02 10:59:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-02 10:59:48 +0000 |
commit | f197e2d9901be1b462edd53b227e01f5d7a9483a (patch) | |
tree | ea1d3cd229de5d84a7696a9275af7b1fd2c6cf06 /libnetdata/health | |
parent | 1d667b145c16811639143afa377293d3ef8d62f0 (diff) |
Coverity 20190924 (#6941)
* coverity_20190924: Fix 215633
In the switch the library stops case this pointer is NULL, so
there is not necessity to processed with tests
* coverity_20190924: Fix 338067
The current code tries to copy the same size of the variable, another possible
solution would be to use a function to sanitize the code, I will try this first
* coverity_20190924: Fix 348638
Considering that we are testing the variable value one line above
The division will always happen
* coverity_20190924: Fix 348640
For this specific case we do not have the possibility to have memory
leak, valgrind confirms this, but I am adding a new variable here to the
stack to discard the warning
Diffstat (limited to 'libnetdata/health')
-rw-r--r-- | libnetdata/health/health.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libnetdata/health/health.c b/libnetdata/health/health.c index b93de8b93e..a70f284b1f 100644 --- a/libnetdata/health/health.c +++ b/libnetdata/health/health.c @@ -136,7 +136,8 @@ int health_silencers_json_read_callback(JSON_ENTRY *e) else if (!strcmp(e->data.string,"DISABLE")) silencers->stype = STYPE_DISABLE_ALARMS; } else { debug(D_HEALTH, "JSON: Adding %s=%s", e->name, e->data.string); - health_silencers_addparam(e->callback_data, e->name, e->data.string); + SILENCER *test = health_silencers_addparam(e->callback_data, e->name, e->data.string); + (void)test; } break; |