Commit 0309152af410dec50680c7a54ae55ba8ebd7fcae

Stefan Sperling 2021-11-20T10:39:04

fix uninitialized error from got_ref_cmp_by_commit_timestamp_descending()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/reference.c b/lib/reference.c
index 3d4dadc..436888f 100644
--- a/lib/reference.c
+++ b/lib/reference.c
@@ -818,7 +818,7 @@ const struct got_error *
 got_ref_cmp_by_commit_timestamp_descending(void *arg, int *cmp,
     struct got_reference *ref1, struct got_reference *ref2)
 {
-	const struct got_error *err;
+	const struct got_error *err = NULL;
 	struct got_repository *repo = arg;
 
 	*cmp = 0;