[CRIU] [PATCH] net: Fix links collection retcode

Pavel Emelyanov xemul at virtuozzo.com
Fri Jun 16 18:19:19 MSK 2017


There's a 

   if (bad_thing) {
	   ret = -1;
	   break;
   }

code above this hunk, whose intention is to propagate -1 back to
caller. This propagation is obviously broken.

Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 criu/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/net.c b/criu/net.c
index 90aa947..f4c8f69 100644
--- a/criu/net.c
+++ b/criu/net.c
@@ -1318,7 +1318,7 @@ static int read_links(struct ns_id *ns)
 	}
 	close_image(img);
 
-	return 0;
+	return ret;
 }
 
 static int restore_link(int nlsk, struct ns_id *ns, struct net_link *link)
-- 
2.1.4


More information about the CRIU mailing list