lkml.org 
[lkml]   [2008]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpuset: sparse warnings in cpuset.c
Harvey wrote:
> No need to redeclare p, we have finished with it at this point,
> so reuse it in the for loop.

Good catch, however I disagree with the fix. It makes the code more
brittle.

It's not a good idea to reuse a variable for some other purpose just
because you "know" the original use is dead. Things don't necessarily
stay dead; code moves around.

Could you prepare a revised version of this patch, that instead of
dropping that declaration of 'p', rather renames it to 'q' ?

Thanks.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.940.382.4214


\
 
 \ /
  Last update: 2008-02-03 08:31    [W:0.060 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site