aboutsummaryrefslogtreecommitdiffstats
path: root/g10/packet.h
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-03-08 10:01:22 +0000
committerJustus Winter <[email protected]>2017-03-08 12:31:10 +0000
commit2649fdfff5d9e227025956e015b67502fd4962c4 (patch)
treebb438851a7a66668a8a38ddba389c3f584da594b /g10/packet.h
parentdirmngr: Do not put a keyserver into a new dirmngr.conf (diff)
downloadgnupg-2649fdfff5d9e227025956e015b67502fd4962c4.tar.gz
gnupg-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 <[email protected]>
Diffstat (limited to 'g10/packet.h')
-rw-r--r--g10/packet.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/g10/packet.h b/g10/packet.h
index 3457f5398..efccc7659 100644
--- a/g10/packet.h
+++ b/g10/packet.h
@@ -280,19 +280,18 @@ typedef struct
u32 help_key_expire;
int help_full_count;
int help_marginal_count;
- int is_primary; /* 2 if set via the primary flag, 1 if calculated */
- int is_revoked;
- int is_expired;
u32 expiredate; /* expires at this date or 0 if not at all */
prefitem_t *prefs; /* list of preferences (may be NULL)*/
u32 created; /* according to the self-signature */
byte selfsigversion;
struct
{
- /* TODO: Move more flags here */
unsigned int mdc:1;
unsigned int ks_modify:1;
unsigned int compacted:1;
+ unsigned int primary:2; /* 2 if set via the primary flag, 1 if calculated */
+ unsigned int revoked:1;
+ unsigned int expired:1;
} flags;
char *mbox; /* NULL or the result of mailbox_from_userid. */
/* The text contained in the user id packet, which is normally the