mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: wilc1000: min_t macro instead of ternary condition operator used
@ 2015-12-27 16:58 Ivan Safonov
  0 siblings, 0 replies; only message in thread
From: Ivan Safonov @ 2015-12-27 16:58 UTC (permalink / raw)
  To: Johnny Kim
  Cc: Austin Shin, Chris Park, Tony Cho, Glen Lee, Leo Kim,
	Greg Kroah-Hartman, linux-wireless, devel, linux-kernel

min_t macro bit shorter then ?: operator.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 8c77520..5a770bb 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -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++)
-- 
2.4.10


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-27 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-27 16:58 [PATCH 1/2] staging: wilc1000: min_t macro instead of ternary condition operator used Ivan Safonov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®