From a370ad07b77f91111e29ca0304dcda5895b8f291 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 29 Jul 2014 14:48:30 +0200 Subject: [PATCH] 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: Matthias Beyer Signed-off-by: Greg Kroah-Hartman --- drivers/staging/bcm/IPv6Protocol.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/bcm/IPv6Protocol.c b/drivers/staging/bcm/IPv6Protocol.c index 44021da1dc2b..5bcdaf949e97 100644 --- a/drivers/staging/bcm/IPv6Protocol.c +++ b/drivers/staging/bcm/IPv6Protocol.c @@ -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; -- 2.39.5