Messages in this thread | | | Date | Sun, 31 Oct 2010 07:21:48 +0100 (CET) | From | Jesper Juhl <> | 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@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
| |