projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #2729 from cekstam/add-scale-and-shift-to-modbus
[collectd.git]
/
src
/
processes.c
diff --git
a/src/processes.c
b/src/processes.c
index
2a4ce1f
..
ffe6c5a
100644
(file)
--- a/
src/processes.c
+++ b/
src/processes.c
@@
-293,7
+293,7
@@
typedef struct procstat {
struct procstat_entry_s *instances;
} procstat_t;
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;
static bool want_init = true;
static bool report_ctx_switch;
@@
-334,7
+334,7
@@
int getargs(void *processBuffer, int bufferLen, char *argsBuffer, int argsLen);
#endif /* HAVE_PROCINFO_H */
#if HAVE_LIBTASKSTATS
#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
#endif
/* put name of process from config to list_head_g tree
@@
-995,8
+995,9
@@
static int ps_read_tasks_status(process_entry_t *ps) {
tpid = ent->d_name;
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;
}
DEBUG("Filename too long: `%s'", filename);
continue;
}