git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git: make was_alias non-static
@ 2015-03-01  6:48 Alexander Kuleshov
  2015-03-01 23:44 ` Eric Sunshine
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Kuleshov @ 2015-03-01  6:48 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Alexander Kuleshov

'was_alias' variable does not need to store it's value each iteration in the
loop, anyway this variable changes it's value with run_argv. So it does not
need to be static.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 git.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git.c b/git.c
index 1780233..b8b6520 100644
--- a/git.c
+++ b/git.c
@@ -682,7 +682,7 @@ int main(int argc, char **av)
 
 	while (1) {
 		static int done_help = 0;
-		static int was_alias = 0;
+		int was_alias = 0;
 		was_alias = run_argv(&argc, &argv);
 		if (errno != ENOENT)
 			break;
-- 
2.3.1.422.ge618558.dirty

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-01 23:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-01  6:48 [PATCH] git: make was_alias non-static Alexander Kuleshov
2015-03-01 23:44 ` Eric Sunshine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).