X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectdmon.c;h=089e52b66c3dbeb167727017006a5b5d13f18173;hb=a0412f28fc15eb04a9a630678a97b6bce2d71fb1;hp=4a7d1a6b6fcfc33a43000edf0177b25806b6e856;hpb=0eff2a882a9265fd59d4f7a265c6b6810acb0032;p=collectd.git diff --git a/src/collectdmon.c b/src/collectdmon.c index 4a7d1a6b..089e52b6 100644 --- a/src/collectdmon.c +++ b/src/collectdmon.c @@ -71,11 +71,11 @@ #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 [-- ]\n" @@ -246,8 +246,8 @@ static void log_status(int status) { 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;