avoid to use error that shadows the function name, use err instead.
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>
This commit is contained in:
parent
b05faa2da9
commit
60b7f38e0e
@ -1907,13 +1907,13 @@ static int check_patch(struct patch *patch, struct patch *prev_patch)
|
|||||||
static int check_patch_list(struct patch *patch)
|
static int check_patch_list(struct patch *patch)
|
||||||
{
|
{
|
||||||
struct patch *prev_patch = NULL;
|
struct patch *prev_patch = NULL;
|
||||||
int error = 0;
|
int err = 0;
|
||||||
|
|
||||||
for (prev_patch = NULL; patch ; patch = patch->next) {
|
for (prev_patch = NULL; patch ; patch = patch->next) {
|
||||||
error |= check_patch(patch, prev_patch);
|
err |= check_patch(patch, prev_patch);
|
||||||
prev_patch = patch;
|
prev_patch = patch;
|
||||||
}
|
}
|
||||||
return error;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_index_list(struct patch *list)
|
static void show_index_list(struct patch *list)
|
||||||
|
@ -232,7 +232,7 @@ static int do_push(const char *repo)
|
|||||||
common_argc = argc;
|
common_argc = argc;
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
int error;
|
int err;
|
||||||
int dest_argc = common_argc;
|
int dest_argc = common_argc;
|
||||||
int dest_refspec_nr = refspec_nr;
|
int dest_refspec_nr = refspec_nr;
|
||||||
const char **dest_refspec = refspec;
|
const char **dest_refspec = refspec;
|
||||||
@ -248,10 +248,10 @@ static int do_push(const char *repo)
|
|||||||
while (dest_refspec_nr--)
|
while (dest_refspec_nr--)
|
||||||
argv[dest_argc++] = *dest_refspec++;
|
argv[dest_argc++] = *dest_refspec++;
|
||||||
argv[dest_argc] = NULL;
|
argv[dest_argc] = NULL;
|
||||||
error = run_command_v(argc, argv);
|
err = run_command_v(argc, argv);
|
||||||
if (!error)
|
if (!err)
|
||||||
continue;
|
continue;
|
||||||
switch (error) {
|
switch (err) {
|
||||||
case -ERR_RUN_COMMAND_FORK:
|
case -ERR_RUN_COMMAND_FORK:
|
||||||
die("unable to fork for %s", sender);
|
die("unable to fork for %s", sender);
|
||||||
case -ERR_RUN_COMMAND_EXEC:
|
case -ERR_RUN_COMMAND_EXEC:
|
||||||
@ -262,7 +262,7 @@ static int do_push(const char *repo)
|
|||||||
case -ERR_RUN_COMMAND_WAITPID_NOEXIT:
|
case -ERR_RUN_COMMAND_WAITPID_NOEXIT:
|
||||||
die("%s died with strange error", sender);
|
die("%s died with strange error", sender);
|
||||||
default:
|
default:
|
||||||
return -error;
|
return -err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user