Re: [Outreachy PATCH v3 1/2] gpg-interface: replace strbuf_split*() with string_list_split*()
- From
Bello Olamide <belkid98@gmail.com>
- Date
- Oct 20, 2025, 18:15 UTC
- Message-ID
- <CAD=f0L9jn5WSkq7UCYw8UQbHAp-wj7Nrh1+qQJ=6RqcuWjjjPw@mail.gmail.com>
- In-Reply-To
- <xmqq347d1qn5.fsf@gitster.g>
On Mon, 20 Oct 2025 at 17:31, Junio C Hamano <gitster@pobox.com> wrote:
Show 18 quoted lines
>
> Junio C Hamano <gitster@pobox.com> writes:
>
> > What I was missing was that we use fingerprint[1], not
> > fingerprint[0]. So we need to do the strchr() twice, i.e.
> >
> > char *begin = fingerprint_stdout.buf;
> > char *delim = strchr(begin, ' ');
> > if (!delim)
> > die_errno("Barf!");
> > begin = delim + 1
> > delim = strchr(begin, ' ');
> > if (!delim)
> > die_errno("Barf!");
> > fingerprint_ret = xmemdupz(begin, end - begin);
>
> Ouch, of course "end" is not declared anywhere and it is an obvious
> typo of delim. Sorry for not proofreading enough.Okay thank you.
I will prepare the patch and resend it. Thanks
Bello