Re: [PATCH 2/3] tree-walk: simplify via strnncmp()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeremiah Mahler wrote:

> --- a/tree-walk.c
> +++ b/tree-walk.c
[...]
> @@ -174,7 +164,7 @@ static int check_entry_match(const char *a, int a_len, const char *b, int b_len)
>  	 * scanning further.
>  	 */
>  
> -	int cmp = name_compare(a, a_len, b, b_len);
> +	int cmp = strnncmp(a, a_len, b, b_len);

This changes behavior: the old version would only have 0 < cmp if
'a' comes after 'b', while the new version always has 0 < cmp when
a != b.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]