@cryptotaxi247 / netdata-1 / commits / d41f38a4a

fix coverity warnings in cgroups (#16328)

Ilya Mashchenko committed Nov 3, 2023 at 14:20 UTC d41f38a4a9d245efd4203b7a334f055b0734e33d
2 files changed +1 -2
collectors/cgroups.plugin/cgroup-discovery.c
-1
@@ -716,7 +716,6 @@ static inline void discovery_update_filenames_cgroup_v2(struct cgroup *cg) {
716 }
717
718 static inline void discovery_update_filenames_all_cgroups() {
719 - struct stat buf;
719 for (struct cgroup *cg = discovered_cgroup_root; cg; cg = cg->discovered_next) {
720 if (unlikely(!cg->available || !cg->enabled || cg->pending_renames))
721 continue;
collectors/cgroups.plugin/sys_fs_cgroup.c
+1 -1
@@ -1586,7 +1586,7 @@ void cgroup_read_host_total_ram() {
1586 if (likely((ff = procfile_readall(ff)) && procfile_lines(ff) && !strncmp(procfile_word(ff, 0), "MemTotal", 8)))
1587 host_ram_total = str2ull(procfile_word(ff, 1), NULL) * 1024;
1588 else
1589 - collector_error("Cannot read file %s. Will not create cgroup %s RAM limit charts.", filename);
1589 + collector_error("Cannot read file %s. Will not create RAM limit charts.", filename);
1590
1591 procfile_close(ff);
1592 }