Commit 414611d9fe15909ca7502d7c65f0a9090923913a

Stefan Sperling 2018-09-19T22:03:24

fix off-by-one in commit ref counter printed by check_refcount()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/object_cache.c b/lib/object_cache.c
index 8bba157..24b34b5 100644
--- a/lib/object_cache.c
+++ b/lib/object_cache.c
@@ -182,7 +182,7 @@ void check_refcount(struct got_object_id *id, void *data, void *arg)
 		if (commit->refcnt == 1)
 			break;
 		fprintf(stderr, "commit %s has %d unclaimed references\n",
-		    id_str, commit->refcnt);
+		    id_str, commit->refcnt - 1);
 		break;
 	}
 	free(id_str);