mirror of
https://github.com/yarrick/iodine.git
synced 2025-01-12 10:59:30 +00:00
Fix NULL check.
This commit is contained in:
parent
b59b665b77
commit
b6444d7712
|
@ -255,7 +255,7 @@ do_pidfile(char *pidfile)
|
||||||
#ifndef WINDOWS32
|
#ifndef WINDOWS32
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
|
||||||
if ((file = fopen(pidfile, "w"))) {
|
if (!(file = fopen(pidfile, "w"))) {
|
||||||
syslog(LOG_ERR, "Cannot write pidfile to %s, exiting", pidfile);
|
syslog(LOG_ERR, "Cannot write pidfile to %s, exiting", pidfile);
|
||||||
err(1, "do_pidfile: Can not write pidfile to %s", pidfile);
|
err(1, "do_pidfile: Can not write pidfile to %s", pidfile);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue