зеркало из https://github.com/microsoft/git.git
ref_update_reject_duplicates(): use `size_t` rather than `int`
Eliminate a theoretical risk of integer overflow if the two types have different sizes. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
2ced105cb1
Коммит
a552e50e5a
2
refs.c
2
refs.c
|
@ -1705,7 +1705,7 @@ int create_symref(const char *ref_target, const char *refs_heads_master,
|
|||
int ref_update_reject_duplicates(struct string_list *refnames,
|
||||
struct strbuf *err)
|
||||
{
|
||||
int i, n = refnames->nr;
|
||||
size_t i, n = refnames->nr;
|
||||
|
||||
assert(err);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче