This patch simplifies
if (a) {
x = false;
} else {
if (b) {
x = false;
}
}
to
if (a || b) {
x = false;
}
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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;