diff options
author | Werner Koch <wk@gnupg.org> | 2009-12-08 17:30:33 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2009-12-08 17:30:33 +0100 |
commit | 9a96043be4bed4e18320918e042b1601c9d93e95 (patch) | |
tree | 0066f7268d25aa95d59cf5fbb7570e487b809c52 /g10/delkey.c | |
parent | Support CERT records via ADNS (diff) | |
download | gnupg2-9a96043be4bed4e18320918e042b1601c9d93e95.tar.xz gnupg2-9a96043be4bed4e18320918e042b1601c9d93e95.zip |
Unification of the search descriptor usage.
Diffstat (limited to 'g10/delkey.c')
-rw-r--r-- | g10/delkey.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/g10/delkey.c b/g10/delkey.c index fe29d52ea..5d86e7291 100644 --- a/g10/delkey.c +++ b/g10/delkey.c @@ -63,12 +63,13 @@ do_delete_key( const char *username, int secret, int force, int *r_sec_avail ) *r_sec_avail = 0; - /* search the userid */ - classify_user_id (username, &desc); + /* Search the userid */ + rc = classify_user_id (username, &desc); exactmatch = (desc.mode == KEYDB_SEARCH_MODE_FPR || desc.mode == KEYDB_SEARCH_MODE_FPR16 || desc.mode == KEYDB_SEARCH_MODE_FPR20); - rc = desc.mode? keydb_search (hd, &desc, 1):G10ERR_INV_USER_ID; + if (!rc) + rc = keydb_search (hd, &desc, 1); if (rc) { log_error (_("key \"%s\" not found: %s\n"), username, g10_errstr (rc)); write_status_text( STATUS_DELETE_PROBLEM, "1" ); |