Skip to content

Commit 7cf0b2b

Browse files
mjggitster
authored andcommitted
do not discard const: keep signature
Here, while we do not mutate the struct itself, many other signatures expect a non-const argument - possibly unnecessarily - so we opt to keep the original signature by casting to non-const. Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 79232fd commit 7cf0b2b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pseudo-merge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ static struct pseudo_merge_commit *find_pseudo_merge(const struct pseudo_merge_m
644644
if (!pm->commits_nr)
645645
return NULL;
646646

647-
return bsearch(&pos, pm->commits, pm->commits_nr,
647+
return (struct pseudo_merge_commit *) bsearch(&pos, pm->commits, pm->commits_nr,
648648
PSEUDO_MERGE_COMMIT_RAWSZ, pseudo_merge_commit_cmp);
649649
}
650650

0 commit comments

Comments
 (0)