summaryrefslogtreecommitdiff
path: root/range-diff.c
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-12-06 20:16:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-06 20:34:49 (GMT)
commitf8675343d79058ab5200e93e6c33058e13d7bb43 (patch)
treed479ad588d5121c780c055faebc22d535dd88a12 /range-diff.c
parent828765dfe0a4a1baae7fae750cbb6a62fcb32c7a (diff)
downloadgit-f8675343d79058ab5200e93e6c33058e13d7bb43.zip
git-f8675343d79058ab5200e93e6c33058e13d7bb43.tar.gz
git-f8675343d79058ab5200e93e6c33058e13d7bb43.tar.bz2
range-diff: mark pointers as const
The contents pointed to by `diffopt` and `other_arg` should not be modified. Mark these as `const` to indicate this. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'range-diff.c')
-rw-r--r--range-diff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/range-diff.c b/range-diff.c
index f56b401..f745567 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -41,7 +41,7 @@ static size_t find_end_of_line(char *buffer, unsigned long size)
* as struct object_id (will need to be free()d).
*/
static int read_patches(const char *range, struct string_list *list,
- struct argv_array *other_arg)
+ const struct argv_array *other_arg)
{
struct child_process cp = CHILD_PROCESS_INIT;
struct strbuf buf = STRBUF_INIT, contents = STRBUF_INIT;
@@ -506,8 +506,8 @@ static struct strbuf *output_prefix_cb(struct diff_options *opt, void *data)
int show_range_diff(const char *range1, const char *range2,
int creation_factor, int dual_color,
- struct diff_options *diffopt,
- struct argv_array *other_arg)
+ const struct diff_options *diffopt,
+ const struct argv_array *other_arg)
{
int res = 0;