[pacman-dev] [PATCH 2/2] libalpm: use else when setting fingerprint
morganamilo
morganamilo at archlinux.org
Thu Jun 3 20:39:23 UTC 2021
The docs [1] say keyid will always be there, so no need to check if it
exists.
[1] https://www.gnupg.org/documentation/manuals/gpgme/Key-objects.html
---
lib/libalpm/signing.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index bba4e991..443682b5 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -350,7 +350,7 @@ static int key_search_keyserver(alpm_handle_t *handle, const char *fpr,
pgpkey->data = key;
if(key->subkeys->fpr) {
pgpkey->fingerprint = key->subkeys->fpr;
- } else if(key->subkeys->keyid) {
+ } else {
pgpkey->fingerprint = key->subkeys->keyid;
}
pgpkey->uid = key->uids->uid;
--
2.31.1
More information about the pacman-dev
mailing list