lkml.org 
[lkml]   [2010]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] SELinux: Do not assign the same value twice to the same variable
On Sat, 30 Oct 2010, Eric Paris wrote:

> On Sat, 2010-10-30 at 23:10 +0200, Jesper Juhl wrote:
> > Hi,
> >
> > It makes little sense to assign the same value to the same variable twice
> > when there is no code inbetween which could have changed the value of that
> > variable.
>
> I don't like the patch. The compiler will optimize it away (actually it
> will optimize both of them away) and it make it clear that if a new
> block is added in the middle that error codes can't be wrong....
>
> It's just a personal preference I guess, but I like always setting the
> error code before goto outs. Is there a reason doing this is a problem?
>
It's not a problem as such, it just seemed a silly thing to do when I came
across it. But, I can see your point in leaving it, so just forget about
the patch.

--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Plain text mails only, please http://www.expita.com/nomime.html
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html



\
 
 \ /
  Last update: 2010-10-31 07:35    [W:0.056 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site