Re: [Outreachy PATCH v3 1/2] gpg-interface: replace strbuf_split*() with string_list_split*()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 20, 2025, 16:31 UTC
- Message-ID
- <xmqq347d1qn5.fsf@gitster.g>
- In-Reply-To
- <xmqq5xc9390j.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
> 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.