summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c4f6a48)
raw | patch | inline | side by side (parent: c4f6a48)
author | Miklos Vajna <vmiklos@frugalware.org> | |
Thu, 9 Oct 2008 00:11:24 +0000 (02:11 +0200) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 9 Oct 2008 15:55:42 +0000 (08:55 -0700) |
This patch just removes an unnecessary goto which makes the code easier
to read and shorter.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
to read and shorter.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
sha1_file.c | patch | blob | history |
diff --git a/sha1_file.c b/sha1_file.c
index 751598786822950766668b4d1c97198b183586f7..ea6bd996b2953e876a02fcf972229c97cb7d590a 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
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;