X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd.c;h=6815cccfd80f2af49e34f6215db737dcac9543ea;hb=18159adcefb255db5a5234a8476e703deb6cc09f;hp=d25975308e9689b15fa9126503f35ed056353a67;hpb=82e27678f8972d2625b466e7e7ba9daaa6395c98;p=collectd.git diff --git a/src/collectd.c b/src/collectd.c index d2597530..6815cccf 100644 --- a/src/collectd.c +++ b/src/collectd.c @@ -384,8 +384,9 @@ static int pidfile_create (void) static int pidfile_remove (void) { const char *file = global_option_get ("PIDFile"); + if (file == NULL) + return 0; - DEBUG ("unlink (%s)", (file != NULL) ? file : ""); return (unlink (file)); } /* static int pidfile_remove (const char *file) */ #endif /* COLLECT_DAEMON */