struct procstat_entry_s *instances;
} procstat_t;
-static procstat_t *list_head_g = NULL;
+static procstat_t *list_head_g;
static bool want_init = true;
static bool report_ctx_switch;
#endif /* HAVE_PROCINFO_H */
#if HAVE_LIBTASKSTATS
-static ts_t *taskstats_handle = NULL;
+static ts_t *taskstats_handle;
#endif
/* put name of process from config to list_head_g tree
gauge_t const delay_factor = 1000000000.0;
struct {
- char *type_instance;
+ const char *type_instance;
gauge_t rate_ns;
} delay_metrics[] = {
{"delay-cpu", ps->delay_cpu},
tpid = ent->d_name;
- if (snprintf(filename, sizeof(filename), "/proc/%li/task/%s/status", ps->id,
- tpid) >= sizeof(filename)) {
+ int r = snprintf(filename, sizeof(filename), "/proc/%li/task/%s/status",
+ ps->id, tpid);
+ if ((size_t)r >= sizeof(filename)) {
DEBUG("Filename too long: `%s'", filename);
continue;
}