diff options
author | Werner Koch <wk@gnupg.org> | 2017-07-28 11:08:32 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2017-07-28 11:08:32 +0200 |
commit | 1c35e29af95c46475f297d2bd70a5f3bd49d45b1 (patch) | |
tree | bef20fad593c837f59d1856c126b012f34016b60 /g10/keydb.h | |
parent | gpg: Fix segv in get_best_pubkey_byname. (diff) | |
download | gnupg2-1c35e29af95c46475f297d2bd70a5f3bd49d45b1.tar.xz gnupg2-1c35e29af95c46475f297d2bd70a5f3bd49d45b1.zip |
gpg: Minor rework for better readibility of get_best_pubkey_byname.
* g10/getkey.c (get_best_pubkey_byname): Change return type to
gpg_error_t. Use var name err instead of rc. Move a
gpg_error_from_syserror closer to the call.
--
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/keydb.h')
-rw-r--r-- | g10/keydb.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/g10/keydb.h b/g10/keydb.h index 15345bb13..f793ada77 100644 --- a/g10/keydb.h +++ b/g10/keydb.h @@ -319,10 +319,10 @@ int get_pubkey_byname (ctrl_t ctrl, /* Likewise, but only return the best match if NAME resembles a mail * address. */ -int get_best_pubkey_byname (ctrl_t ctrl, - GETKEY_CTX *retctx, PKT_public_key *pk, - const char *name, KBNODE *ret_keyblock, - int include_unusable, int no_akl); +gpg_error_t get_best_pubkey_byname (ctrl_t ctrl, + GETKEY_CTX *retctx, PKT_public_key *pk, + const char *name, KBNODE *ret_keyblock, + int include_unusable, int no_akl); /* Get a public key directly from file FNAME. */ gpg_error_t get_pubkey_fromfile (ctrl_t ctrl, |