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 numeric variables to 0
[collectd.git]
/
src
/
collectdmon.c
diff --git
a/src/collectdmon.c
b/src/collectdmon.c
index
9040f8d
..
089e52b
100644
(file)
--- a/
src/collectdmon.c
+++ b/
src/collectdmon.c
@@
-71,11
+71,11
@@
#define WCOREDUMP(s) 0
#endif /* ! WCOREDUMP */
#define WCOREDUMP(s) 0
#endif /* ! WCOREDUMP */
-static int loop
= 0
;
-static int restart
= 0
;
+static int loop;
+static int restart;
-static const char *pidfile
= NULL
;
-static pid_t collectd_pid
= 0
;
+static const char *pidfile;
+static pid_t collectd_pid;
__attribute__((noreturn)) static void exit_usage(const char *name) {
printf("Usage: %s <options> [-- <collectd options>]\n"
__attribute__((noreturn)) static void exit_usage(const char *name) {
printf("Usage: %s <options> [-- <collectd options>]\n"
@@
-246,8
+246,8
@@
static void log_status(int status) {
static void check_respawn(void) {
time_t t = time(NULL);
static void check_respawn(void) {
time_t t = time(NULL);
- static time_t timestamp
= 0
;
- static int counter
= 0
;
+ static time_t timestamp;
+ static int counter;
if ((t - 120) < timestamp)
++counter;
if ((t - 120) < timestamp)
++counter;
@@
-386,5
+386,3
@@
int main(int argc, char **argv) {
free(collectd_argv);
return 0;
} /* main */
free(collectd_argv);
return 0;
} /* main */
-
-/* vim: set sw=4 ts=4 tw=78 noexpandtab : */