diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-05-21 19:07:22 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-05-21 19:07:22 +0200 |
commit | b4b638b1d6c273ec656f566a119adde2b4c3d950 (patch) | |
tree | fcf02d2695699e5909c455d2673c6860d7d2adc9 | |
parent | Allow newfstatat for new glibc (diff) | |
download | mulder-listen-daemon-master.tar.xz mulder-listen-daemon-master.zip |
-rw-r--r-- | mulderd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -149,7 +149,7 @@ int main(int argc, char *argv[]) socklen_t connection_addr_len; int daemonize = 0, option_index = 0, port = 17, connection_file = -1, option; char *pid_file = 0, *connection_log = 0; - FILE *pidfile; + FILE *pidfile = NULL; struct epoll_event event, events[EPOLL_EVENTS] = { 0 }; static struct option long_options[] = { @@ -266,7 +266,7 @@ int main(int argc, char *argv[]) close(STDOUT_FILENO); } } - if (pid_file) { + if (pidfile) { if (fprintf(pidfile, "%d\n", getpid()) < 0) { perror("fprintf"); return EXIT_FAILURE; |