mirror of
https://github.com/yarrick/iodine.git
synced 2025-02-21 14:53:17 +03: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…
x
Reference in New Issue
Block a user