提交 749bc58c 编写于 作者: M Miklos Vajna 提交者: Shawn O. Pearce

Cleanup in sha1_file.c::cache_or_unpack_entry()

This patch just removes an unnecessary goto which makes the code easier
to read and shorter.
Signed-off-by: NMiklos Vajna <vmiklos@frugalware.org>
Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
上级 c4f6a489
......@@ -1571,11 +1571,9 @@ static void *cache_or_unpack_entry(struct packed_git *p, off_t base_offset,
struct delta_base_cache_entry *ent = delta_base_cache + hash;
ret = ent->data;
if (ret && ent->p == p && ent->base_offset == base_offset)
goto found_cache_entry;
return unpack_entry(p, base_offset, type, base_size);
if (!ret || ent->p != p || ent->base_offset != base_offset)
return unpack_entry(p, base_offset, type, base_size);
found_cache_entry:
if (!keep_cache) {
ent->data = NULL;
ent->lru.next->prev = ent->lru.prev;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册