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

Panu Matilainen notifications at github.com
Tue Oct 1 05:10:51 UTC 2024


@pmatilai commented on this pull request.



>  	free(pgpsubkeys);
     }
     *count = pgpsubkeysCount;
 
     return subkeys;
 }
 
+rpmPubkey rpmPubkeyPrimarykey(rpmPubkey key)
+{
+    rpmPubkey primarykey = NULL;
+    if (key) {
+	wrlock lock(key->mutex);
+	if (key->primarykey == NULL) {
+	    primarykey = key;
+	    primarykey->nrefs++; /* can't use rpmPubkeyLink due to wrlock */
+	} else {
+	    primarykey = key->primarykey;
+	    rpmPubkeyLink(primarykey);

Make that `primarykey = rpmPubkeyLink(key->primarykey)` to make it clear what happens there. You should think of fooLink() as returning a new reference rather than something just does ++ internally.

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

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


More information about the Rpm-maint mailing list