summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/108/other/1811499
blob: b2cf9fa0b442596306ddb1941c60114db728a082 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
device: 0.785
network: 0.767
socket: 0.744
files: 0.734
vnc: 0.661
graphic: 0.565
semantic: 0.564
other: 0.552
PID: 0.531
performance: 0.486
boot: 0.470
debug: 0.440
KVM: 0.433
permissions: 0.421

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

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 ?

Have fixed in this patch.
https://lists.nongnu.org/archive/html/qemu-devel/2019-01/msg02859.html

Thanks
Zhang Chen

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