Commit 2b722da41f438553af3a13a6a58b5e9e2392ebc0

Colin Stolley 2021-12-24T10:47:43

Update src/refdb_fs.c Co-authored-by: Edward Thomson <ethomson@github.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/refdb_fs.c b/src/refdb_fs.c
index 65bbf66..adedc8d 100644
--- a/src/refdb_fs.c
+++ b/src/refdb_fs.c
@@ -605,9 +605,8 @@ cmp_record_to_refname(const char *rec, size_t data_end, const char *ref_name)
 	data_end -= GIT_OID_HEXSZ + 1;
 
 	end = memchr(rec, '\n', data_end);
-	if (end) {
+	if (end)
 		data_end = end - rec;
-	}
 
 	cmp_val = memcmp(rec, ref_name, min(ref_len, data_end));