lkml.org 
[lkml]   [2008]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v6 1/2] Massive code cleanup of sys_msync()
2008/1/18, Miklos Szeredi <miklos@szeredi.hu>:
> > unsigned long end;
> > - struct mm_struct *mm = current->mm;
> > + int error, unmapped_error;
> > struct vm_area_struct *vma;
> > - int unmapped_error = 0;
> > - int error = -EINVAL;
> > + struct mm_struct *mm;
> >
> > + error = -EINVAL;
>
> I think you may have misunderstood my last comment. These are OK:
>
> struct mm_struct *mm = current->mm;
> int unmapped_error = 0;
> int error = -EINVAL;
>
> This is not so good:
>
> int error, unmapped_error;
>
> This is the worst:
>
> int error = -EINVAL, unmapped_error = 0;
>
> So I think the original code is fine as it is.
>
> Othewise patch looks OK now.

I moved the initialization of the variables to the code where they are needed.

I don't agree that "int a; int b;" is better than "int a, b".

>
> Miklos
>


\
 
 \ /
  Last update: 2008-01-18 11:33    [W:0.060 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site