g10: Simplify code. Turn struct getkey_ctx_s.found_key into an argument
authorNeal H. Walfield <neal@g10code.com>
Wed, 9 Sep 2015 19:04:57 +0000 (21:04 +0200)
committerNeal H. Walfield <neal@g10code.com>
Wed, 16 Sep 2015 13:15:18 +0000 (15:15 +0200)
commitd47e84946ee010917cfc3501062721b74afbb771
tree289287e93cc16564a768e9f6acd48c623de6507d
parentc110e186e07fb1035dc757d322274f939df1c86d
g10: Simplify code.  Turn struct getkey_ctx_s.found_key into an argument

* g10/getkey.c (struct getkey_ctx_s): Remove field found_key.
(lookup): Add argument ret_found_key.  If not NULL, set it to the
found key.  Update callers.
(pk_from_block): Add argument found_key.  Use it instead of
CTX->FOUND_KEY.  Update callers.
(finish_lookup): Return a KBNODE (the found key) instead of an int.
Don't set CTX->FOUND_KEY.  Return the found key instead.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>.
g10/getkey.c