Re: [PATCH] ALSA/ASoC: replace ternary operator with min()

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

 



On Tue, Oct 25, 2022 at 10:56:11PM +0800, wangkailong@xxxxxxx wrote:
> Fix the following coccicheck warning:
> 
> sound/soc/soc-ops.c:817: WARNING opportunity for min()

>  	kfree(uctl);
> -	return err < 0 ? err : 0;
> +	return min(err, 0);

I don't think this is a good warning, while I'm no big fan of the
ternery operator the new code is less clear about the intent than the
old code.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux