summaryrefslogtreecommitdiffstats
path: root/g10/trust.c
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2017-03-08 11:01:22 +0100
committerJustus Winter <justus@g10code.com>2017-03-08 13:31:10 +0100
commit2649fdfff5d9e227025956e015b67502fd4962c4 (patch)
treebb438851a7a66668a8a38ddba389c3f584da594b /g10/trust.c
parentdirmngr: Do not put a keyserver into a new dirmngr.conf (diff)
downloadgnupg2-2649fdfff5d9e227025956e015b67502fd4962c4.tar.xz
gnupg2-2649fdfff5d9e227025956e015b67502fd4962c4.zip
g10: Move more flags into the flag bitfield.
* g10/packet.h (PKT_user_id): Move 'is_primary', 'is_revoked', and 'is_expired' into the flags bitfield, and drop the prefix. * g10/call-dirmngr.c: Adapt accordingly. * g10/export.c: Likewise. * g10/getkey.c: Likewise. * g10/import.c: Likewise. * g10/kbnode.c: Likewise. * g10/keyedit.c: Likewise. * g10/keylist.c: Likewise. * g10/keyserver.c: Likewise. * g10/mainproc.c: Likewise. * g10/pkclist.c: Likewise. * g10/pubkey-enc.c: Likewise. * g10/tofu.c: Likewise. * g10/trust.c: Likewise. * g10/trustdb.c: Likewise. -- This patch has been created by applying the following semantic patch: @@ expression E; @@ -E->is_expired +E->flags.expired @@ expression E; @@ -E->is_primary +E->flags.primary @@ expression E; @@ -E->is_revoked +E->flags.revoked Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'g10/trust.c')
-rw-r--r--g10/trust.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/g10/trust.c b/g10/trust.c
index 77fde4cf6..b1f6222a3 100644
--- a/g10/trust.c
+++ b/g10/trust.c
@@ -145,9 +145,9 @@ uid_trust_string_fixed (ctrl_t ctrl, PKT_public_key *key, PKT_user_id *uid)
uid are both NULL, or neither are NULL. */
return _("10 translator see trust.c:uid_trust_string_fixed");
}
- else if(uid->is_revoked || (key && key->flags.revoked))
+ else if(uid->flags.revoked || (key && key->flags.revoked))
return _("[ revoked]");
- else if(uid->is_expired)
+ else if(uid->flags.expired)
return _("[ expired]");
else if(key)
{
@@ -703,7 +703,7 @@ clean_uid_from_key (kbnode_t keyblock, kbnode_t uidnode, int noisy)
IDs if --allow-non-selfsigned-uid is set. */
if (uid->created
|| uid->flags.compacted
- || (!uid->is_expired && !uid->is_revoked && opt.allow_non_selfsigned_uid))
+ || (!uid->flags.expired && !uid->flags.revoked && opt.allow_non_selfsigned_uid))
return 0;
for (node=uidnode->next;
@@ -723,9 +723,9 @@ clean_uid_from_key (kbnode_t keyblock, kbnode_t uidnode, int noisy)
const char *reason;
char *user = utf8_to_native (uid->name, uid->len, 0);
- if (uid->is_revoked)
+ if (uid->flags.revoked)
reason = _("revoked");
- else if (uid->is_expired)
+ else if (uid->flags.expired)
reason = _("expired");
else
reason = _("invalid");