From: Alexander Kuleshov <kuleshovmail@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Alexander Kuleshov <kuleshovmail@gmail.com>
Subject: [PATCH] git: make was_alias and done_help non-static
Date: Mon, 2 Mar 2015 18:02:37 +0600 [thread overview]
Message-ID: <1425297757-16431-1-git-send-email-kuleshovmail@gmail.com> (raw)
'was_alias' variable does not need to store it's value on each
iteration in the loop, anyway this variable changes it's value with run_argv.
'done_help' variable does not need to be static variable too if we'll move it
out the loop.
So these variables do not need to be static.
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
---
git.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/git.c b/git.c
index 1780233..96723b8 100644
--- a/git.c
+++ b/git.c
@@ -619,6 +619,7 @@ int main(int argc, char **av)
{
const char **argv = (const char **) av;
const char *cmd;
+ int done_help, was_alias;
startup_info = &git_startup_info;
@@ -681,8 +682,6 @@ int main(int argc, char **av)
setup_path();
while (1) {
- static int done_help = 0;
- static int was_alias = 0;
was_alias = run_argv(&argc, &argv);
if (errno != ENOENT)
break;
--
2.3.1.422.ge618558
next reply other threads:[~2015-03-02 12:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 12:02 Alexander Kuleshov [this message]
2015-03-02 20:29 ` [PATCH] git: make was_alias and done_help non-static Jeff King
2015-03-03 10:58 ` Stefan Näwe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1425297757-16431-1-git-send-email-kuleshovmail@gmail.com \
--to=kuleshovmail@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox