summary refs log tree commit diff stats
path: root/results/scraper/launchpad-without-comments/1926995
blob: ebd88965cbbd482f284150a54bde09fa09cdb827 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
hw/remote/mpqemu-link.c:221: bad error checking ?

hw/remote/mpqemu-link.c:221:36: warning: logical ‘and’ of mutually exclusive tests is always false [-Wlogical-op]

Source code is

   if (msg->cmd >= MPQEMU_CMD_MAX && msg->cmd < 0) {
        return false;
    }

Maybe better code:

   if (msg->cmd >= MPQEMU_CMD_MAX || msg->cmd < 0) {
        return false;
    }

It might be useful to switch on gcc compiler flag -Wlogical-op
to see these warnings.