Thread (20 messages) 20 messages, 2 authors, 2025-10-23

Re: [Outreachy PATCH v4 1/2] gpg-interface: do not use misdesigned strbuf_split*()

From: Christian Couder <hidden>
Date: 2025-10-21 06:51:34

On Tue, Oct 21, 2025 at 8:46 AM Christian Couder
[off-list ref] wrote:
quoted
+       delim = strchr(begin, ' ');
+       if (!delim)
+           die_errno(_("failed to get the ssh fingerprint for key %s"),
+                         signing_key);
+       fingerprint_ret = xmemdupz(begin, delim - begin);
        strbuf_release(&fingerprint_stdout);
        return fingerprint_ret;
I think this could be `return xmemdupz(begin, delim - begin);`, so we
could get rid of `fingerprint_ret`.
No, actually I think we need `fingerprint_ret` because we need to call
`xmemdupz(begin, delim - begin)` before releasing
`fingerprint_stdout`. Sorry for the noise.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help