tree-walk: rename "error" variable
The "error" variable in traverse_trees() shadows the global error() function (meaning we can't call error() from here). Let's call the local variable "ret" instead, which matches the idiom in other functions. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
acd13d1eec
commit
c7cd0e34cd
|
@ -441,7 +441,7 @@ int traverse_trees(struct index_state *istate,
|
||||||
int n, struct tree_desc *t,
|
int n, struct tree_desc *t,
|
||||||
struct traverse_info *info)
|
struct traverse_info *info)
|
||||||
{
|
{
|
||||||
int error = 0;
|
int ret = 0;
|
||||||
struct name_entry *entry;
|
struct name_entry *entry;
|
||||||
int i;
|
int i;
|
||||||
struct tree_desc_x *tx;
|
struct tree_desc_x *tx;
|
||||||
|
@ -539,7 +539,7 @@ int traverse_trees(struct index_state *istate,
|
||||||
if (interesting) {
|
if (interesting) {
|
||||||
trees_used = info->fn(n, mask, dirmask, entry, info);
|
trees_used = info->fn(n, mask, dirmask, entry, info);
|
||||||
if (trees_used < 0) {
|
if (trees_used < 0) {
|
||||||
error = trees_used;
|
ret = trees_used;
|
||||||
if (!info->show_all_errors)
|
if (!info->show_all_errors)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -558,7 +558,7 @@ int traverse_trees(struct index_state *istate,
|
||||||
strbuf_release(&base);
|
strbuf_release(&base);
|
||||||
|
|
||||||
traverse_trees_cur_depth--;
|
traverse_trees_cur_depth--;
|
||||||
return error;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct dir_state {
|
struct dir_state {
|
||||||
|
|
Loading…
Reference in New Issue