Commit e32db9f2b85685801fb249e35bf62a32ef09dc98

Edward Thomson 2022-02-27T08:54:09

cli: always give a value to `error`

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/cli/opt_usage.c b/src/cli/opt_usage.c
index 6e5d600..478b416 100644
--- a/src/cli/opt_usage.c
+++ b/src/cli/opt_usage.c
@@ -150,7 +150,7 @@ int cli_opt_help_fprint(
 {
 	git_str help = GIT_BUF_INIT;
 	const cli_opt_spec *spec;
-	int error;
+	int error = 0;
 
 	/* Display required arguments first */
 	for (spec = specs; spec->type; ++spec) {