[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1010310717200.17199@swampdragon.chaosbits.net>
Date: Sun, 31 Oct 2010 07:21:48 +0100 (CET)
From: Jesper Juhl <jj@...osbits.net>
To: Eric Paris <eparis@...hat.com>
cc: linux-kernel@...r.kernel.org, Stephen Smalley <sds@...ho.nsa.gov>,
James Morris <jmorris@...ei.org>,
Eric Paris <eparis@...isplace.org>,
Stephen Hemminger <shemminger@...tta.com>,
ulia Lawall <julia@...u.dk>,
linux-security-module@...r.kernel.org
Subject: Re: [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@...osbits.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists