提交 a370ad07 编写于 作者: M Matthias Beyer 提交者: Greg Kroah-Hartman

Staging: bcm: IPv6Protocol.c: Removed unnecessary if-else blocks

This patch simplifies

    if (a) {
        x = false;
    } else {
        if (b) {
            x = false;
        }
    }

to
    if (a || b) {
        x = false;
    }
Signed-off-by: NMatthias Beyer <mail@beyermatthias.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 b0162025
......@@ -272,12 +272,9 @@ USHORT IpVersion6(struct bcm_mini_adapter *Adapter, PVOID pcIpHeader,
INT iMatchedSFQueueIndex = 0;
iMatchedSFQueueIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID);
if (iMatchedSFQueueIndex >= NO_OF_QUEUES) {
if ((iMatchedSFQueueIndex >= NO_OF_QUEUES) ||
(Adapter->PackInfo[iMatchedSFQueueIndex].bActive == false))
bClassificationSucceed = false;
} else {
if (Adapter->PackInfo[iMatchedSFQueueIndex].bActive == false)
bClassificationSucceed = false;
}
}
return bClassificationSucceed;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册