From 2649fdfff5d9e227025956e015b67502fd4962c4 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 8 Mar 2017 11:01:22 +0100 Subject: 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 --- g10/trustdb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'g10/trustdb.c') diff --git a/g10/trustdb.c b/g10/trustdb.c index a0b9d5f48..7b76ac841 100644 --- a/g10/trustdb.c +++ b/g10/trustdb.c @@ -1140,14 +1140,14 @@ tdb_get_validity_core (ctrl_t ctrl, } /* If the user id is revoked or expired, then skip it. */ - if (user_id->is_revoked || user_id->is_expired) + if (user_id->flags.revoked || user_id->flags.expired) { if (DBG_TRUST) { char *s; - if (user_id->is_revoked && user_id->is_expired) + if (user_id->flags.revoked && user_id->flags.expired) s = "revoked and expired"; - else if (user_id->is_revoked) + else if (user_id->flags.revoked) s = "revoked"; else s = "expire"; @@ -1156,7 +1156,7 @@ tdb_get_validity_core (ctrl_t ctrl, s, user_id->name); } - if (user_id->is_revoked) + if (user_id->flags.revoked) continue; expired = 1; @@ -1645,8 +1645,8 @@ validate_one_keyblock (KBNODE kb, struct key_item *klist, resigned. -dshaw */ if (node->pkt->pkttype == PKT_USER_ID - && !node->pkt->pkt.user_id->is_revoked - && !node->pkt->pkt.user_id->is_expired) + && !node->pkt->pkt.user_id->flags.revoked + && !node->pkt->pkt.user_id->flags.expired) { if (uidnode && issigned) { -- cgit v1.2.3