Re: [PATCH] SELinux: Do not assign the same value twice to the samevariable

From: Jesper Juhl
Date: Sun Oct 31 2010 - 02:32:20 EST


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@xxxxxxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/