qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Bug 1811499] Re: qemu/net/colo-compare.c:288: possible poi


From: Peter Maydell
Subject: [Qemu-devel] [Bug 1811499] Re: qemu/net/colo-compare.c:288: possible pointless code duplication ?
Date: Tue, 26 Mar 2019 16:46:14 -0000

The fix is now in master as commit 6d3aaa5b255ffc55a0561 and will be in
QEMU 4.0.


** Changed in: qemu
       Status: New => Fix Committed

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1811499

Title:
  qemu/net/colo-compare.c:288: possible pointless code duplication ?

Status in QEMU:
  Fix Committed

Bug description:
  qemu/net/colo-compare.c:288] -> [qemu/net/colo-compare.c:296]: (style)
  The if condition is the same as the previous if condition

  Source code is

      if (ppkt->tcp_seq == spkt->tcp_seq && ppkt->seq_end == spkt->seq_end) {
          if (colo_compare_packet_payload(ppkt, spkt,
                                          ppkt->header_size, spkt->header_size,
                                          ppkt->payload_size)) {
              *mark = COLO_COMPARE_FREE_SECONDARY | COLO_COMPARE_FREE_PRIMARY;
              return true;
          }
      }
      if (ppkt->tcp_seq == spkt->tcp_seq && ppkt->seq_end == spkt->seq_end) {
          if (colo_compare_packet_payload(ppkt, spkt,
                                          ppkt->header_size, spkt->header_size,
                                          ppkt->payload_size)) {
              *mark = COLO_COMPARE_FREE_SECONDARY | COLO_COMPARE_FREE_PRIMARY;
              return true;
          }
      }

  Maybe the second block was supposed to be different ?

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1811499/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]