Skip to content

Commit cd67a90

Browse files
committed
examples: cast away const-ness
1 parent 1118dd9 commit cd67a90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/merge.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static void opts_add_refish(merge_options *opts, const char *refish)
5757
assert(opts != NULL);
5858

5959
sz = ++opts->heads_count * sizeof(opts->heads[0]);
60-
opts->heads = xrealloc(opts->heads, sz);
60+
opts->heads = (const char **)xrealloc(opts->heads, sz);
6161
opts->heads[opts->heads_count - 1] = refish;
6262
}
6363

@@ -354,7 +354,7 @@ int lg2_merge(git_repository *repo, int argc, char **argv)
354354
}
355355

356356
cleanup:
357-
free(opts.heads);
357+
free((char **)opts.heads);
358358
free(opts.annotated);
359359

360360
return 0;

0 commit comments

Comments
 (0)