[Rpm-maint] [rpm-software-management/rpm] rpmKeyring: Support keys with the same key ID (PR #3398)

Panu Matilainen notifications at github.com
Wed Oct 23 13:23:47 UTC 2024


@pmatilai commented on this pull request.



>  
-	/* We call verify even if key not found for a signature sanity check */
-	char *lints = NULL;
-	rc = pgpVerifySignature2(pgpkey, sig, ctx, &lints);
-	if (lints) {
+	if (rc != RPMRC_OK) {
+	    /* Only failing keys */
+	    for (auto item : results) {

Oh and here we get to the wonders of C++ diversity :laughing: - *this* syntax makes copies, so except for trivialities like integers you always want to use a reference in this construct, called "range based for loop". And, whenever possible, use a const reference at that. 
So: `for (auto const & item)` (and here "item" is appropriate because it is a reference to the item, not an iterator)

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

Message ID: <rpm-software-management/rpm/pull/3398/review/2388680490 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241023/ad85ef12/attachment.html>


More information about the Rpm-maint mailing list