Skip to content

Commit ae5ee18

Browse files
emiliomystor
authored andcommitted
mailmap: git_vector_get already checks bounds
1 parent ae22213 commit ae5ee18

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/mailmap.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,7 @@ git_mailmap_entry *git_mailmap_entry_lookup(
267267

268268
git_mailmap_entry *git_mailmap_entry_byindex(git_mailmap *mailmap, size_t idx)
269269
{
270-
if (idx < git_vector_length(&mailmap->entries))
271-
return git_vector_get(&mailmap->entries, idx);
272-
273-
return NULL;
270+
return git_vector_get(&mailmap->entries, idx);
274271
}
275272

276273
size_t git_mailmap_entry_count(git_mailmap *mailmap)

0 commit comments

Comments
 (0)