Re: [PATCH v3 21/33] merge-recursive: add get_directory_renames()
- From
Elijah Newren <newren@gmail.com>
- Date
- Nov 26, 2017, 01:45 UTC
- Message-ID
- <CABPp-BHYNQzNnXqCuUafyN0UK5y6KQZapdjsXj+dW+dwL=B+nQ@mail.gmail.com>
- In-Reply-To
- <alpine.DEB.2.21.1.1711260147330.6482@virtualbox>
On Sat, Nov 25, 2017 at 4:52 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Tue, 21 Nov 2017, Elijah Newren wrote: > >> diff --git a/merge-recursive.c b/merge-recursive.c
<snip>
Show 11 quoted lines
>> + if (old_len != new_len || strncmp(old_path, new_path, old_len)) {
>> + *old_dir = strndup(old_path, old_len);
>> + *new_dir = strndup(new_path, new_len);
>
> These two callers of strndup() are the only ones in Git's code base now.
> It is also causing a compile error on Windows.
>
> Any reason you did not use xstrndup() here?
>
> Ciao,
> DschoNope, was just unaware. I'll go ahead and switch them over for my next roll of the series. Sorry for the pain.