summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b05faa2)
raw | patch | inline | side by side (parent: b05faa2)
author | Pierre Habouzit <madcoder@debian.org> | |
Wed, 23 Aug 2006 10:39:10 +0000 (12:39 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 24 Aug 2006 01:47:38 +0000 (18:47 -0700) |
builtin-apply.c and builtin-push.c uses a local variable called 'error'
which shadows the error() function.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
which shadows the error() function.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-apply.c | patch | blob | history | |
builtin-push.c | patch | blob | history |
diff --git a/builtin-apply.c b/builtin-apply.c
index 4f0eef0ac3c2d20475b0b50e81f4d51cd4f95396..59917379f9aa49afc80cdf5110324834a5dddf96 100644 (file)
--- a/builtin-apply.c
+++ b/builtin-apply.c
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 2b5e6fa9ed18c20cda264dbaf9df9d3cbac93c0e..ada8338cc1d0fbf389cd346b5134595afaaa2e66 100644 (file)
--- a/builtin-push.c
+++ b/builtin-push.c
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;
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:
case -ERR_RUN_COMMAND_WAITPID_NOEXIT:
die("%s died with strange error", sender);
default:
- return -error;
+ return -err;
}
}
return 0;