Re: [PATCH 3/3] unpack-trees: simplify via strnncmp()
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jun 16, 2014, 20:19 UTC
- Message-ID
- <20140616201905.GP8557@google.com>
- In-Reply-To
- <ee1716e209794a66eb9677e798164a356276700e.1402945507.git.jmmahler@gmail.com>
Jeremiah Mahler wrote:
> --- a/unpack-trees.c > +++ b/unpack-trees.c
[...]
Show 6 quoted lines
> @@ -678,7 +667,7 @@ static int find_cache_pos(struct traverse_info *info, > ce_len = ce_slash - ce_name; > else > ce_len = ce_namelen(ce) - pfxlen; > - cmp = name_compare(p->path, p_len, ce_name, ce_len); > + cmp = strnncmp(p->path, p_len, ce_name, ce_len);
Likewise --- the sign of the result is important here.