Commit 0b796438 authored by Christoffer Ackelman's avatar Christoffer Ackelman

Fixed warning about for loop initialization

parent 1768b009
...@@ -1644,6 +1644,7 @@ static void daemonize() ...@@ -1644,6 +1644,7 @@ static void daemonize()
{ {
pid_t pid = 0; pid_t pid = 0;
struct sigaction act; struct sigaction act;
int fd;
// First fork // First fork
pid = fork(); pid = fork();
...@@ -1672,7 +1673,7 @@ static void daemonize() ...@@ -1672,7 +1673,7 @@ static void daemonize()
chdir("/"); chdir("/");
// Close all file descriptors // Close all file descriptors
for (int fd = sysconf(_SC_OPEN_MAX); fd > 0; fd--) for (fd = sysconf(_SC_OPEN_MAX); fd > 0; fd--)
close(fd); close(fd);
// Reopen some fds // Reopen some fds
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment