summaryrefslogtreecommitdiff
path: root/examples/merge.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-06-25 14:55:51 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2019-06-25 15:22:46 +0100
commitcd67a9039cbaedaf9e23ab2e6eb0fc1f7292e057 (patch)
tree64b3f526363dbb310fd223c691cddc77d3ed37cf /examples/merge.c
parent1118dd9a40ad2c443a047cbec4d9669bad9ee954 (diff)
downloadlibgit2-cd67a9039cbaedaf9e23ab2e6eb0fc1f7292e057.tar.gz
examples: cast away const-ness
Diffstat (limited to 'examples/merge.c')
-rw-r--r--examples/merge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/merge.c b/examples/merge.c
index 8ddb79b84..3f858f018 100644
--- a/examples/merge.c
+++ b/examples/merge.c
@@ -57,7 +57,7 @@ static void opts_add_refish(merge_options *opts, const char *refish)
assert(opts != NULL);
sz = ++opts->heads_count * sizeof(opts->heads[0]);
- opts->heads = xrealloc(opts->heads, sz);
+ opts->heads = (const char **)xrealloc(opts->heads, sz);
opts->heads[opts->heads_count - 1] = refish;
}
@@ -354,7 +354,7 @@ int lg2_merge(git_repository *repo, int argc, char **argv)
}
cleanup:
- free(opts.heads);
+ free((char **)opts.heads);
free(opts.annotated);
return 0;