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>
This commit is contained in:
Matthias Beyer 2014-07-15 09:43:12 +02:00 committed by Greg Kroah-Hartman
parent 1c53f0877e
commit 18002f567f
1 changed files with 4 additions and 5 deletions

View File

@ -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;
}
}