@cryptotaxi247 / netdata-1 / commits / a97f06a6e

Fix coverity issues 373612 & 373611 (#11684)

* fix 2 coverity errors * remove call to sql_queue_removed_alerts_to_aclk from health

Emmanuel Vasilakis committed Oct 22, 2021 at 15:44 UTC a97f06a6ebdcd4bf197cfb4249ed747a52ac9243
2 files changed +2 -10
database/sqlite/sqlite_aclk_alert.c
+2 -2
@@ -670,9 +670,9 @@ void health_alarm_entry2proto_nolock(struct alarm_log_entry *alarm_log, ALARM_EN
670 alarm_log->utc_offset = host->utc_offset;
671 alarm_log->timezone = strdupz((char *)host->abbrev_timezone);
672 alarm_log->exec_path = ae->exec ? strdupz((char *)ae->exec) : strdupz((char *)host->health_default_exec);
673 - alarm_log->conf_source = strdupz(ae->source);
673 + alarm_log->conf_source = ae->source ? strdupz((char *)ae->source) : "";
674
675 - alarm_log->command = strdupz(edit_command);
675 + alarm_log->command = strdupz((char *)edit_command);
676
677 alarm_log->duration = (time_t)ae->duration;
678 alarm_log->non_clear_duration = (time_t)ae->non_clear_duration;
health/health.c
-8
@@ -1038,13 +1038,6 @@ void *health_main(void *ptr) {
1038 rrdhost_unlock(host);
1039 }
1040
1041 -#ifdef ENABLE_NEW_CLOUD_PROTOCOL
1042 - if (aclk_alert_reloaded) {
1043 - sql_queue_removed_alerts_to_aclk(host);
1044 - aclk_alert_reloaded = 0;
1045 - }
1046 -#endif
1047 -
1041 if (unlikely(netdata_exit))
1042 break;
1043
@@ -1071,7 +1064,6 @@ void *health_main(void *ptr) {
1064
1065 rrd_unlock();
1066
1074 -
1067 if(unlikely(netdata_exit))
1068 break;
1069