summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Zhijian2020-10-16 07:52:04 +0200
committerJason Wang2020-11-11 09:52:23 +0100
commit45b9e8c33a844c80d6067a3271652af5654ba7bd (patch)
treebceaa9f4d840aa30c4ab1253d60357f0e1ff57ba
parentcolo-compare: fix missing compare_seq initialization (diff)
downloadqemu-45b9e8c33a844c80d6067a3271652af5654ba7bd.tar.gz
qemu-45b9e8c33a844c80d6067a3271652af5654ba7bd.tar.xz
qemu-45b9e8c33a844c80d6067a3271652af5654ba7bd.zip
colo-compare: check mark in mutual exclusion
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
-rw-r--r--net/colo-compare.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/colo-compare.c b/net/colo-compare.c
index a35c10fb59..8d476bbd99 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -477,13 +477,11 @@ sec:
colo_release_primary_pkt(s, ppkt);
g_queue_push_head(&conn->secondary_list, spkt);
goto pri;
- }
- if (mark == COLO_COMPARE_FREE_SECONDARY) {
+ } else if (mark == COLO_COMPARE_FREE_SECONDARY) {
conn->compare_seq = spkt->seq_end;
packet_destroy(spkt, NULL);
goto sec;
- }
- if (mark == (COLO_COMPARE_FREE_PRIMARY | COLO_COMPARE_FREE_SECONDARY)) {
+ } else if (mark == (COLO_COMPARE_FREE_PRIMARY | COLO_COMPARE_FREE_SECONDARY)) {
conn->compare_seq = ppkt->seq_end;
colo_release_primary_pkt(s, ppkt);
packet_destroy(spkt, NULL);