From: "Stefan Näwe" <stefan.naewe@atlas-elektronik.com>
To: Alexander Kuleshov <kuleshovmail@gmail.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] git: make was_alias and done_help non-static
Date: Tue, 3 Mar 2015 11:58:49 +0100 [thread overview]
Message-ID: <54F593E9.2070209@atlas-elektronik.com> (raw)
In-Reply-To: <1425297757-16431-1-git-send-email-kuleshovmail@gmail.com>
Am 02.03.2015 um 13:02 schrieb Alexander Kuleshov:
> '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.
s/it's/its/
> '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;
>
/S
--
----------------------------------------------------------------
/dev/random says: Recovery program for excessive talkers: On-and-on-Anon.
python -c "print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')"
GPG Key fingerprint = 2DF5 E01B 09C3 7501 BCA9 9666 829B 49C5 9221 27AF
prev parent reply other threads:[~2015-03-03 11:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 12:02 [PATCH] git: make was_alias and done_help non-static Alexander Kuleshov
2015-03-02 20:29 ` Jeff King
2015-03-03 10:58 ` Stefan Näwe [this message]
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=54F593E9.2070209@atlas-elektronik.com \
--to=stefan.naewe@atlas-elektronik.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kuleshovmail@gmail.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