summaryrefslogtreecommitdiff
path: root/other/bootstrap_daemon/src/tox-bootstrapd.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2016-01-04 22:48:58 -0500
committerirungentoo <irungentoo@gmail.com>2016-01-04 22:48:58 -0500
commit405854e1e70a22d042cd0e544d1460055b65d57a (patch)
treee5cc9fc5fda064fa57df467bf949742852f283ac /other/bootstrap_daemon/src/tox-bootstrapd.c
parentc6bed82d47aa39709bdd568fccc3847714ed1b74 (diff)
Cleanups.
Diffstat (limited to 'other/bootstrap_daemon/src/tox-bootstrapd.c')
-rw-r--r--other/bootstrap_daemon/src/tox-bootstrapd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/other/bootstrap_daemon/src/tox-bootstrapd.c b/other/bootstrap_daemon/src/tox-bootstrapd.c
index e252a37d..27a910f3 100644
--- a/other/bootstrap_daemon/src/tox-bootstrapd.c
+++ b/other/bootstrap_daemon/src/tox-bootstrapd.c
@@ -127,6 +127,7 @@ void daemonize(LOG_BACKEND log_backend, char *pid_file_path)
127 127
128 // Open the PID file for writing 128 // Open the PID file for writing
129 pid_file = fopen(pid_file_path, "a+"); 129 pid_file = fopen(pid_file_path, "a+");
130
130 if (pid_file == NULL) { 131 if (pid_file == NULL) {
131 write_log(LOG_LEVEL_ERROR, "Couldn't open the PID file for writing: %s. Exiting.\n", pid_file_path); 132 write_log(LOG_LEVEL_ERROR, "Couldn't open the PID file for writing: %s. Exiting.\n", pid_file_path);
132 exit(1); 133 exit(1);
@@ -209,7 +210,8 @@ int main(int argc, char *argv[])
209 } 210 }
210 211
211 if (port < MIN_ALLOWED_PORT || port > MAX_ALLOWED_PORT) { 212 if (port < MIN_ALLOWED_PORT || port > MAX_ALLOWED_PORT) {
212 write_log(LOG_LEVEL_ERROR, "Invalid port: %d, should be in [%d, %d]. Exiting.\n", port, MIN_ALLOWED_PORT, MAX_ALLOWED_PORT); 213 write_log(LOG_LEVEL_ERROR, "Invalid port: %d, should be in [%d, %d]. Exiting.\n", port, MIN_ALLOWED_PORT,
214 MAX_ALLOWED_PORT);
213 return 1; 215 return 1;
214 } 216 }
215 217