lkml.org 
[lkml]   [2021]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] kvm: Avoid shadowing a local in search_memslots()
From
Date


On 10/26/21 11:44 AM, Sean Christopherson 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.

\
 
 \ /
  Last update: 2021-10-26 18:15    [W:0.042 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site