diff options
-rw-r--r-- | daemons/clvmd/clvmd.c | 4 | ||||
-rw-r--r-- | libdaemon/server/daemon-server.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c index 99d01d06c..c6d51bda1 100644 --- a/daemons/clvmd/clvmd.c +++ b/daemons/clvmd/clvmd.c @@ -855,12 +855,12 @@ static void main_loop(int cmd_timeout) int quorate = clops->is_quorate(); int client_count = 0; int max_fd = 0; + struct local_client *lastfd = &local_client_head; + struct local_client *nextfd = local_client_head.next; /* Wait on the cluster FD and all local sockets/pipes */ local_client_head.fd = clops->get_main_cluster_fd(); FD_ZERO(&in); - struct local_client *lastfd = &local_client_head; - struct local_client *nextfd = local_client_head.next; for (thisfd = &local_client_head; thisfd; thisfd = thisfd->next) { client_count++; diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c index 4f34aaf8d..d9d60d1aa 100644 --- a/libdaemon/server/daemon-server.c +++ b/libdaemon/server/daemon-server.c @@ -539,6 +539,7 @@ void daemon_start(daemon_state s) log_state _log = { { 0 } }; thread_state _threads = { .next = NULL }; unsigned timeout_count = 0; + fd_set in; /* * Switch to C locale to avoid reading large locale-archive file used by @@ -623,7 +624,6 @@ void daemon_start(daemon_state s) while (!_shutdown_requested && !failed) { _reset_timeout(s); - fd_set in; FD_ZERO(&in); FD_SET(s.socket_fd, &in); if (select(FD_SETSIZE, &in, NULL, NULL, _get_timeout(s)) < 0 && errno != EINTR) |