staging: wilc1000: min_t macro instead of ternary condition operator used
PATCH 1/2 staging: wilc1000: min_t macro instead of ternary condition operator used
min_t macro bit shorter then ?: operator.
Signed-off-by Ivan Safonov <[email protected]>
--- drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/host_interface.c +2 -2
@@ -4570,7 +4570,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo) pNewJoinBssParam->rsn_grp_policy = pu8IEs[rsnIndex]; rsnIndex++; jumpOffset = pu8IEs[rsnIndex] *4 ; - pcipherCount = (pu8IEs[rsnIndex] >3 ) ?3 : pu8IEs[rsnIndex]; + pcipherCount =min_t (u8, pu8IEs[rsnIndex],3 ); rsnIndex +=2 ;for (i = pcipherTotalCount, j =0 ; i < pcipherCount + pcipherTotalCount && i <3 ; i++, j++)
@@ -4581,7 +4581,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo) jumpOffset = pu8IEs[rsnIndex] *4 ; - authCount = (pu8IEs[rsnIndex] >3 ) ?3 : pu8IEs[rsnIndex]; + authCount =min_t (u8, pu8IEs[rsnIndex],3 ); rsnIndex +=2 ;for (i = authTotalCount, j =0 ; i < authTotalCount + authCount; i++, j++)
Signature · 1 line
2.4.10