[CRIU] [PATCH 1/3] remote: Move variable declaration out of loop

Radostin Stoyanov rstoyanov1 at gmail.com
Wed Jan 30 12:04:47 MSK 2019


Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
---
 criu/img-remote.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/criu/img-remote.c b/criu/img-remote.c
index 9f49e92fd..014d3f4c5 100644
--- a/criu/img-remote.c
+++ b/criu/img-remote.c
@@ -808,7 +808,7 @@ void check_pending()
 }
 
 void accept_image_connections() {
-	int ret;
+	int ret, n_events, i;
 
 	epoll_fd = epoll_create(EPOLL_MAX_EVENTS);
 	if (epoll_fd < 0) {
@@ -840,8 +840,6 @@ void accept_image_connections() {
 	}
 
 	while (1) {
-		int n_events, i;
-
 		n_events = epoll_wait(epoll_fd, events, EPOLL_MAX_EVENTS, 250);
 		if (n_events < 0) {
 			pr_perror("Failed to epoll wait");
-- 
2.20.1



More information about the CRIU mailing list