Re: [PATCH] config: remove useless assignment
- From
Jeff King <peff@peff.net>
- Date
- Mar 28, 2012, 20:22 UTC
- Message-ID
- <20120328202233.GB29315@sigill.intra.peff.net>
- In-Reply-To
- <4F73721D.4010808@lsrfire.ath.cx>
On Wed, Mar 28, 2012 at 10:18:37PM +0200, René Scharfe wrote:
Show 21 quoted lines
> v1.7.9-8-g270a344 (config: stop using config_exclusive_filename) replaced > config_exclusive_filename with given_config_file. In one case this > resulted in a self-assignment, which is reported by clang as a warning. > Remove the useless code. > > Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> > --- > builtin/config.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/builtin/config.c b/builtin/config.c > index d41a9bf..33c8820 100644 > --- a/builtin/config.c > +++ b/builtin/config.c > @@ -397,8 +397,6 @@ int cmd_config(int argc, const char **argv, const char *prefix) > xstrdup(prefix_filename(prefix, > strlen(prefix), > given_config_file)); > - else > - given_config_file = given_config_file; > }
Thanks. I remember refactoring that part of the conditional several times while figuring out the right ordering of my refactoring patches, but obviously I missed removing the stale code on the final pass-through.
Acked-by: Jeff King <peff@peff.net>
-Peff