Re: [PATCH] staging: rtl8723bs: Replace ternary statement with min function

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

 



On Wed, Oct 26, 2022 at 06:26:54PM -0700, Emily Peri wrote:
> Ternary statements that pick the min of two values can be replaced by
> the built-in min() function. This improves readability, since its quicker
> to understand min(x, y) than x < y ? x : y. Issue found by coccicheck.
> 
> Signed-off-by: Emily Peri <eperi1024@xxxxxxxxx>

This breaks the build.  Use min_t(uint, wps_ielen, MAX_WPS_IE_LEN);

regards,
dan carpenter
 




[Index of Archives]     [Linux Driver Development]     [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