Commit 1118dd9a40ad2c443a047cbec4d9669bad9ee954

Edward Thomson 2019-06-25T14:50:12

examples: don't lose `const`

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/examples/describe.c b/examples/describe.c
index 2d95312..0437ca1 100644
--- a/examples/describe.c
+++ b/examples/describe.c
@@ -54,7 +54,7 @@ static void opts_add_commit(describe_options *opts, const char *commit)
 	assert(opts != NULL);
 
 	sz = ++opts->commit_count * sizeof(opts->commits[0]);
-	opts->commits = xrealloc(opts->commits, sz);
+	opts->commits = (const char **)xrealloc(opts->commits, sz);
 	opts->commits[opts->commit_count - 1] = commit;
 }