[PATCH 17/22] Staging: bcm: PHSModule.c: Simplified nested if statements by linking them with logical AND in GetServiceFlowEntry()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Matthias Beyer <mail@xxxxxxxxxxxxxxxx>
---
 drivers/staging/bcm/PHSModule.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c
index 83bd12b..5eec706 100644
--- a/drivers/staging/bcm/PHSModule.c
+++ b/drivers/staging/bcm/PHSModule.c
@@ -963,11 +963,9 @@ UINT GetServiceFlowEntry(IN struct bcm_phs_table *psServiceFlowTable,
 
 	for (i = 0; i < MAX_SERVICEFLOWS; i++) {
 		curr_sf_list = &psServiceFlowTable->stSFList[i];
-		if (curr_sf_list->bUsed) {
-			if (curr_sf_list->uiVcid == uiVcid) {
-				*ppstServiceFlowEntry = curr_sf_list;
-				return i;
-			}
+		if (curr_sf_list->bUsed && (curr_sf_list->uiVcid == uiVcid)) {
+			*ppstServiceFlowEntry = curr_sf_list;
+			return i;
 		}
 	}
 
-- 
2.0.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux