Subject: RE: [PATCH v2 2/2] [GSOC] ref-filter: add %(raw) atom

From: Felipe Contreras <[email-masked]>
Date: Mon, 31 May 2021 10:41:31 -0500

ZheNing Hu via GitGitGadget wrote:
> From: ZheNing Hu <[email-masked]>

> +static int memcasecmp(const void *vs1, const void *vs2, size_t n)
> +{
> +	const char *s1 = (const void *)vs1;
> +	const char *s2 = (const void *)vs2;

As I explained in another mail, I think this is better:

	const char *s1 = vs1, *s2 = vs2;

> +	const char *end = s1 + n;
> +
> +	for (; s1 < end; s1++, s2++) {
> +		int diff = tolower(*s1) - tolower(*s2);
> +		if (diff)
> +			return diff;
> +	}
> +	return 0;
> +}

-- 
Felipe Contreras