libxl: colo: simplify colo_proxy_async_wait_for_checkpoint
authorWei Liu <wei.liu2@citrix.com>
Mon, 4 Apr 2016 17:34:06 +0000 (18:34 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 6 Apr 2016 13:50:52 +0000 (14:50 +0100)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_colo_save.c

index e2fdc4b93152c7d80e6fdc6a7eeed17a79058a4c..26b3afdd1d6555f2ad50885a80bf1f8a38cda607 100644 (file)
@@ -533,11 +533,11 @@ static void colo_proxy_async_wait_for_checkpoint(libxl__colo_save_state *css)
     if (req < 0) {
         /* some error happens */
         _exit(1);
-    } else if (!req) {
-        /* no checkpoint is needed, do a checkpoint every 5s */
-        _exit(0);
     } else {
-        /* net packets is not consistent, we need to start a checkpoint */
+        /* req == 0: no checkpoint is needed, do a checkpoint every 5s */
+        /* req > 0: net packets is not consistent, we need to start a
+         * checkpoint
+         */
         _exit(0);
     }
 }