"!X == 2" is always false (spotted by Coverity), so the checks
for whether rndis is in the correct state would never fire.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
if (is_rndis(s)) {
msg = (struct rndis_packet_msg_type *) s->in_buf;
- if (!s->rndis_state == RNDIS_DATA_INITIALIZED)
+ if (s->rndis_state != RNDIS_DATA_INITIALIZED) {
return -1;
+ }
if (size + sizeof(struct rndis_packet_msg_type) > sizeof(s->in_buf))
return -1;
{
USBNetState *s = DO_UPCAST(NICState, nc, nc)->opaque;
- if (is_rndis(s) && !s->rndis_state == RNDIS_DATA_INITIALIZED) {
+ if (is_rndis(s) && s->rndis_state != RNDIS_DATA_INITIALIZED) {
return 1;
}