{"thread":{"id":"30088","subject":"[PATCH] config: remove useless assignment","startedAt":"2012-03-28T20:18:37Z","lastAt":"2012-03-28T20:22:33Z","messageCount":2,"participants":["René Scharfe","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"187991","messageId":"4F73721D.4010808@lsrfire.ath.cx","threadId":"30088","inReplyTo":null,"subject":"[PATCH] config: remove useless assignment","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2012-03-28T20:18:37Z","receivedAt":"2012-03-28T20:18:37Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"v1.7.9-8-g270a344 (config: stop using config_exclusive_filename) replaced\nconfig_exclusive_filename with given_config_file.  In one case this\nresulted in a self-assignment, which is reported by clang as a warning.\nRemove the useless code.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n builtin/config.c |    2 --\n 1 file changed, 2 deletions(-)\n\ndiff --git a/builtin/config.c b/builtin/config.c\nindex d41a9bf..33c8820 100644\n--- a/builtin/config.c\n+++ b/builtin/config.c\n@@ -397,8 +397,6 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n \t\t\t\txstrdup(prefix_filename(prefix,\n \t\t\t\t\t\t\tstrlen(prefix),\n \t\t\t\t\t\t\tgiven_config_file));\n-\t\telse\n-\t\t\tgiven_config_file = given_config_file;\n \t}\n \n \tif (respect_includes == -1)\n-- \n1.7.9.2\n"},{"id":"187994","messageId":"20120328202233.GB29315@sigill.intra.peff.net","threadId":"30088","inReplyTo":"4F73721D.4010808@lsrfire.ath.cx","subject":"Re: [PATCH] config: remove useless assignment","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-03-28T20:22:33Z","receivedAt":"2012-03-28T20:22:33Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 28, 2012 at 10:18:37PM +0200, René Scharfe wrote:\n\n> v1.7.9-8-g270a344 (config: stop using config_exclusive_filename) replaced\n> config_exclusive_filename with given_config_file.  In one case this\n> resulted in a self-assignment, which is reported by clang as a warning.\n> Remove the useless code.\n> \n> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n> ---\n>  builtin/config.c |    2 --\n>  1 file changed, 2 deletions(-)\n> \n> diff --git a/builtin/config.c b/builtin/config.c\n> index d41a9bf..33c8820 100644\n> --- a/builtin/config.c\n> +++ b/builtin/config.c\n> @@ -397,8 +397,6 @@ int cmd_config(int argc, const char **argv, const char *prefix)\n>  \t\t\t\txstrdup(prefix_filename(prefix,\n>  \t\t\t\t\t\t\tstrlen(prefix),\n>  \t\t\t\t\t\t\tgiven_config_file));\n> -\t\telse\n> -\t\t\tgiven_config_file = given_config_file;\n>  \t}\n\nThanks. I remember refactoring that part of the conditional several\ntimes while figuring out the right ordering of my refactoring patches,\nbut obviously I missed removing the stale code on the final\npass-through.\n\nAcked-by: Jeff King <peff@peff.net>\n\n-Peff\n"}]}