Fix NULL check.

This commit is contained in:
syb0rg 2014-04-24 10:36:57 -05:00
parent b59b665b77
commit b6444d7712
1 changed files with 1 additions and 1 deletions

View File

@ -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 {