Commit 1d009603343786f6022ef690e513f183c5840747

Justin Spahr-Summers 2012-12-09T02:40:16

orite C89

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/cache.c b/src/cache.c
index 6780175..cbd360a 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -83,12 +83,12 @@ void *git_cache_try_store(git_cache *cache, void *_entry)
 	}
 
 	{
+		git_cached_obj *node = cache->nodes[hash & cache->size_mask];
+
 		/* increase the refcount on this object, because
 		 * the cache now owns it */
 		git_cached_obj_incref(entry);
 
-		git_cached_obj *node = cache->nodes[hash & cache->size_mask];
-
 		if (node == NULL) {
 			cache->nodes[hash & cache->size_mask] = entry;
 		} else if (git_oid_cmp(&node->oid, &entry->oid) == 0) {