projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't initialize static pointers to NULL
[collectd.git]
/
src
/
processes.c
diff --git
a/src/processes.c
b/src/processes.c
index
d283d3e
..
cfc5790
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
@@
-1252,38
+1252,38
@@
static int ps_delay(process_entry_t *ps) {
#endif
static void ps_fill_details(const procstat_t *ps, process_entry_t *entry) {
#endif
static void ps_fill_details(const procstat_t *ps, process_entry_t *entry) {
- if (entry->has_io ==
0
) {
+ if (entry->has_io ==
false
) {
ps_read_io(entry);
ps_read_io(entry);
- entry->has_io =
1
;
+ entry->has_io =
true
;
}
if (ps->report_ctx_switch) {
}
if (ps->report_ctx_switch) {
- if (entry->has_cswitch ==
0
) {
+ if (entry->has_cswitch ==
false
) {
ps_read_tasks_status(entry);
ps_read_tasks_status(entry);
- entry->has_cswitch =
1
;
+ entry->has_cswitch =
true
;
}
}
if (ps->report_maps_num) {
int num_maps;
}
}
if (ps->report_maps_num) {
int num_maps;
- if (entry->has_maps ==
0
&& (num_maps = ps_count_maps(entry->id)) > 0) {
+ if (entry->has_maps ==
false
&& (num_maps = ps_count_maps(entry->id)) > 0) {
entry->num_maps = num_maps;
}
entry->num_maps = num_maps;
}
- entry->has_maps =
1
;
+ entry->has_maps =
true
;
}
if (ps->report_fd_num) {
int num_fd;
}
if (ps->report_fd_num) {
int num_fd;
- if (entry->has_fd ==
0
&& (num_fd = ps_count_fd(entry->id)) > 0) {
+ if (entry->has_fd ==
false
&& (num_fd = ps_count_fd(entry->id)) > 0) {
entry->num_fd = num_fd;
}
entry->num_fd = num_fd;
}
- entry->has_fd =
1
;
+ entry->has_fd =
true
;
}
#if HAVE_LIBTASKSTATS
if (ps->report_delay && !entry->has_delay) {
if (ps_delay(entry) == 0) {
}
#if HAVE_LIBTASKSTATS
if (ps->report_delay && !entry->has_delay) {
if (ps_delay(entry) == 0) {
- entry->has_delay =
1
;
+ entry->has_delay =
true
;
}
}
#endif
}
}
#endif
@@
-2632,7
+2632,7
@@
static int ps_read(void) {
read_fork_rate();
#endif /* KERNEL_SOLARIS */
read_fork_rate();
#endif /* KERNEL_SOLARIS */
- want_init =
0
;
+ want_init =
false
;
return 0;
} /* int ps_read */
return 0;
} /* int ps_read */