[Rpm-maint] [rpm-software-management/rpm] Add Key Fingerprints to rpmsinfoMsg() (PR #3321)

Panu Matilainen notifications at github.com
Tue Oct 1 10:43:16 UTC 2024


@pmatilai commented on this pull request.



>  
 	/* Returned to C, can't use new */
 	subkeys = (rpmPubkey *)xmalloc(pgpsubkeysCount * sizeof(*subkeys));
-	for (i = 0; i < pgpsubkeysCount; i++)
-	    subkeys[i] = rpmPubkeyNewSubkey(pgpsubkeys[i]);
+	for (i = 0; i < pgpsubkeysCount; i++) {
+	    subkeys[i] = rpmPubkeyNewSubkey(primarykey, pgpsubkeys[i]);
+	    primarykey->nrefs++; /* can't use rpmPubkeyLink due to wrlock */

Yes you want because then you don't need the comment to explain it, and it's the right technique for this kind of  job. Wrapping it into function is less text than arguing it :sweat_smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3321#discussion_r1782544560
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3321/review/2339830108 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241001/ff715bd0/attachment.html>


More information about the Rpm-maint mailing list