diff options
author | Werner Koch <[email protected]> | 2020-02-12 16:29:51 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-02-12 16:29:51 +0000 |
commit | 8c63430d1a40a70ff8b4ddf1ed0fcabf9c0afbcc (patch) | |
tree | 3d09e30b1948e41cb0524c4aa01ebd2642b2dbd2 /g10/call-agent.c | |
parent | card: Fix parsing of the received card_list. (diff) | |
download | gnupg-8c63430d1a40a70ff8b4ddf1ed0fcabf9c0afbcc.tar.gz gnupg-8c63430d1a40a70ff8b4ddf1ed0fcabf9c0afbcc.zip |
gpg: Rename the struct card_key_info_s.
* g10/call-agent.h (struct card_key_info_s): Rename to ...
(struct keypair_info_s): this.
(keypair_info_t): New. Use this everywhere instead of
card_key_info_s.
* g10/call-agent.c (agent_scd_free_keyinfo): Rename to ..
(free_keypair_info): this. Change all callers.
--
The struct is also useful to store the data from KEYPAIRINFO status
lines. Thus renaming it makes sense. A future patch will extend the
struct.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/call-agent.c')
-rw-r--r-- | g10/call-agent.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c index 5faa2d311..6eb4ad32c 100644 --- a/g10/call-agent.c +++ b/g10/call-agent.c @@ -1530,10 +1530,12 @@ agent_scd_cardlist (strlist_t *result) return 0; } + + struct card_keyinfo_parm_s { int error; - struct card_key_info_s *list; + keypair_info_t list; }; /* Callback function for agent_card_keylist. */ @@ -1554,8 +1556,8 @@ card_keyinfo_cb (void *opaque, const char *line) { const char *s; int n; - struct card_key_info_s *keyinfo; - struct card_key_info_s **l_p = &parm->list; + keypair_info_t keyinfo; + keypair_info_t *l_p = &parm->list; while ((*l_p)) l_p = &(*l_p)->next; @@ -1636,9 +1638,9 @@ card_keyinfo_cb (void *opaque, const char *line) void -agent_scd_free_keyinfo (struct card_key_info_s *l) +free_keypair_info (keypair_info_t l) { - struct card_key_info_s *l_next; + keypair_info_t l_next; for (; l; l = l_next) { @@ -1656,7 +1658,7 @@ agent_scd_free_keyinfo (struct card_key_info_s *l) and NULL is stored at RESULT. */ gpg_error_t agent_scd_keyinfo (const char *keygrip, int cap, - struct card_key_info_s **result) + keypair_info_t *result) { int err; struct card_keyinfo_parm_s parm; @@ -1691,7 +1693,7 @@ agent_scd_keyinfo (const char *keygrip, int cap, if (!err) *result = parm.list; else - agent_scd_free_keyinfo (parm.list); + free_keypair_info (parm.list); return err; } |