Re: [PATCH] kvm: Avoid shadowing a local in search_memslots()

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

 



On 26/10/21 18:14, Qian Cai wrote:
Maybe "pivot"?  Or just "tmp"?  I also vote to hoist the declaration out of the
loop precisely to avoid potential shadows, and to also associate the variable
with the "start" and "end" variables, e.g.
Actually, I am a bit more prefer to keep the declaration inside the loop
as it makes the declaration and assignment closer to make it easier to
understand the code. It should be relatively trivial to avoid potential
shadows in the future. It would be interesting to see what Paolo would say.

You both have good arguments, so whoever writes the patch wins. :)

Paolo




[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