diff options
author | Li Zhijian | 2020-10-16 07:52:04 +0200 |
---|---|---|
committer | Jason Wang | 2020-11-11 09:52:23 +0100 |
commit | 45b9e8c33a844c80d6067a3271652af5654ba7bd (patch) | |
tree | bceaa9f4d840aa30c4ab1253d60357f0e1ff57ba | |
parent | colo-compare: fix missing compare_seq initialization (diff) | |
download | qemu-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.c | 6 |
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); |