Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apply: use strcmp(3) for comparing strings in gitdiff_verify_name()
We don't know the length of the C string "another". It could be shorter than "name", which we compare it to using memchr(3). Call strcmp(3) instead to avoid running over the end of the former, and get rid of a strlen(3) call as a bonus. Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
- Loading branch information