summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mulderd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mulderd.c b/mulderd.c
index 3452b78..b66b94c 100644
--- a/mulderd.c
+++ b/mulderd.c
@@ -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;