From: Miklos Vajna Date: Thu, 9 Oct 2008 00:11:24 +0000 (+0200) Subject: Cleanup in sha1_file.c::cache_or_unpack_entry() X-Git-Tag: v1.6.1-rc1~170 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=749bc58c5eab5b6947d2c01e02d12320005eba99;p=git.git 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: Miklos Vajna Signed-off-by: Shawn O. Pearce --- diff --git a/sha1_file.c b/sha1_file.c index 751598786..ea6bd996b 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -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;