From b6444d7712102919d445c217bd6c5f7094ca7db3 Mon Sep 17 00:00:00 2001 From: syb0rg Date: Thu, 24 Apr 2014 10:36:57 -0500 Subject: [PATCH] Fix NULL check. --- src/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.c b/src/common.c index d7088c0..3c5d1a4 100644 --- a/src/common.c +++ b/src/common.c @@ -255,7 +255,7 @@ do_pidfile(char *pidfile) #ifndef WINDOWS32 FILE *file; - if ((file = fopen(pidfile, "w"))) { + if (!(file = fopen(pidfile, "w"))) { syslog(LOG_ERR, "Cannot write pidfile to %s, exiting", pidfile); err(1, "do_pidfile: Can not write pidfile to %s", pidfile); } else {