X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fcollectd.c;h=6815cccfd80f2af49e34f6215db737dcac9543ea;hb=dbf349ec8c0150a52a7bad5f8b9fc79a6201e2f6;hp=d25975308e9689b15fa9126503f35ed056353a67;hpb=96e0f2341bace029acefe0a88bab96ae326c0ff5;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 */