RE: [PATCH] KVM: replace ternary operator with min()

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

 



From: Bo Liu
> Sent: 01 November 2022 07:25
> 
> Fix the following coccicheck warning:
> 
> virt/kvm/kvm_main.c:5289:10-11: WARNING opportunity for min()
...
> -	return r < 0 ? r : 0;
> +	return min(r, 0);

As has been repeatedly pointer out this is bogus.
min() should only be used for 'sizes'.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux