Let's use "ret" value for "return" statement in "open_midx_bitmap()" just as the same way as int "open_pack_bitmap()". Signed-off-by: Teng Long <dyroneteng@xxxxxxxxx> --- pack-bitmap.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pack-bitmap.c b/pack-bitmap.c index 9c666cdb8b..931219adf0 100644 --- a/pack-bitmap.c +++ b/pack-bitmap.c @@ -494,15 +494,18 @@ static int open_pack_bitmap(struct repository *r, static int open_midx_bitmap(struct repository *r, struct bitmap_index *bitmap_git) { + int ret = -1; struct multi_pack_index *midx; assert(!bitmap_git->map); for (midx = get_multi_pack_index(r); midx; midx = midx->next) { - if (!open_midx_bitmap_1(bitmap_git, midx)) - return 0; + if (!open_midx_bitmap_1(bitmap_git, midx)) { + ret = 0; + break; + } } - return -1; + return ret; } static int open_bitmap(struct repository *r, -- 2.35.1.579.g70500b6343.dirty