summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2014-07-15 07:43:12 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-15 15:09:49 (GMT)
commit18002f567fcbfcaf36c1ed359bca603d2cc58b8e (patch)
treef56c7223be9f5345e5a76b1c18cec1a33ab7797f
parent1c53f0877e874e4713e73342e51f8f3543fd59f9 (diff)
downloadlinux-18002f567fcbfcaf36c1ed359bca603d2cc58b8e.tar.xz
Staging: bcm: PHSModule.c: Simplified nested if statements by linking them with logical AND in GetPhsRuleEntry()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/bcm/PHSModule.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c
index 4074eb8..ceb5758 100644
--- a/drivers/staging/bcm/PHSModule.c
+++ b/drivers/staging/bcm/PHSModule.c
@@ -1017,11 +1017,10 @@ static UINT GetPhsRuleEntry(IN struct bcm_phs_classifier_table *pstClassifierTab
pstClassifierRule =
&pstClassifierTable->stOldPhsRulesList[i];
- if (pstClassifierRule->bUsed) {
- if (pstClassifierRule->u8PHSI == uiPHSI) {
- *ppstPhsRule = pstClassifierRule->pstPhsRule;
- return i;
- }
+ if (pstClassifierRule->bUsed &&
+ (pstClassifierRule->u8PHSI == uiPHSI)) {
+ *ppstPhsRule = pstClassifierRule->pstPhsRule;
+ return i;
}
}