git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] avoid to use error that shadows the function name, use err instead.
@ 2006-08-23 10:39 Pierre Habouzit
  2006-08-23 10:39 ` [PATCH 2/7] git_dir holds pointers to local strings, hence MUST be const Pierre Habouzit
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre Habouzit @ 2006-08-23 10:39 UTC (permalink / raw)
  To: git; +Cc: Pierre Habouzit

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---
 builtin-apply.c |    6 +++---
 builtin-push.c  |   10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/builtin-apply.c b/builtin-apply.c
index 4f0eef0..5991737 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -1907,13 +1907,13 @@ static int check_patch(struct patch *pat
 static int check_patch_list(struct patch *patch)
 {
 	struct patch *prev_patch = NULL;
-	int error = 0;
+	int err = 0;
 
 	for (prev_patch = NULL; patch ; patch = patch->next) {
-		error |= check_patch(patch, prev_patch);
+		err |= check_patch(patch, prev_patch);
 		prev_patch = patch;
 	}
-	return error;
+	return err;
 }
 
 static void show_index_list(struct patch *list)
diff --git a/builtin-push.c b/builtin-push.c
index 2b5e6fa..ada8338 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -232,7 +232,7 @@ static int do_push(const char *repo)
 	common_argc = argc;
 
 	for (i = 0; i < n; i++) {
-		int error;
+		int err;
 		int dest_argc = common_argc;
 		int dest_refspec_nr = refspec_nr;
 		const char **dest_refspec = refspec;
@@ -248,10 +248,10 @@ static int do_push(const char *repo)
 		while (dest_refspec_nr--)
 			argv[dest_argc++] = *dest_refspec++;
 		argv[dest_argc] = NULL;
-		error = run_command_v(argc, argv);
-		if (!error)
+		err = run_command_v(argc, argv);
+		if (!err)
 			continue;
-		switch (error) {
+		switch (err) {
 		case -ERR_RUN_COMMAND_FORK:
 			die("unable to fork for %s", sender);
 		case -ERR_RUN_COMMAND_EXEC:
@@ -262,7 +262,7 @@ static int do_push(const char *repo)
 		case -ERR_RUN_COMMAND_WAITPID_NOEXIT:
 			die("%s died with strange error", sender);
 		default:
-			return -error;
+			return -err;
 		}
 	}
 	return 0;
-- 
1.4.1.1

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

end of thread, other threads:[~2006-08-23 10:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-23 10:39 [PATCH 1/7] avoid to use error that shadows the function name, use err instead Pierre Habouzit
2006-08-23 10:39 ` [PATCH 2/7] git_dir holds pointers to local strings, hence MUST be const Pierre Habouzit
2006-08-23 10:39   ` [PATCH 3/7] missing 'static' keywords Pierre Habouzit
2006-08-23 10:39     ` [PATCH 4/7] remove ugly shadowing of loop indexes in subloops Pierre Habouzit
2006-08-23 10:39       ` [PATCH 5/7] missing #define DEBUG 0 that made the preprocessor whine Pierre Habouzit
2006-08-23 10:39         ` [PATCH 6/7] use name[len] in switch directly, instead of creating a shadowed variable Pierre Habouzit
2006-08-23 10:39           ` [PATCH 7/7] n is in fact unused, and is later shadowed Pierre Habouzit

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).