diff options
author | Werner Koch <wk@gnupg.org> | 2015-06-04 18:08:26 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-06-04 18:08:26 +0200 |
commit | a4a15195c2a3729025a3ba3439ac8860083fceeb (patch) | |
tree | 2c88b60ff534373b33930223eedf80c1c9f7f14e /g10/tdbdump.c | |
parent | gpg: Cleanup error code path in case of a bad trustdb. (diff) | |
download | gnupg2-a4a15195c2a3729025a3ba3439ac8860083fceeb.tar.xz gnupg2-a4a15195c2a3729025a3ba3439ac8860083fceeb.zip |
gpg: Replace -1 by GPG_ERR_NOT_FOUND in tdbio.c
* g10/tdbio.c (lookup_hashtable): Return GPG_ERR_NOT_FOUND.
* g10/tdbdump.c (import_ownertrust): Test for GPG_ERR_NOT_FOUND.
* g10/trustdb.c (read_trust_record): Ditto.
(tdb_get_ownertrust, tdb_get_min_ownertrust): Ditto.
(tdb_update_ownertrust, update_min_ownertrust): Ditto.
(tdb_clear_ownertrusts, update_validity): Ditto.
(tdb_cache_disabled_value): Ditto.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/tdbdump.c')
-rw-r--r-- | g10/tdbdump.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/tdbdump.c b/g10/tdbdump.c index ff90b46ed..893c9820a 100644 --- a/g10/tdbdump.c +++ b/g10/tdbdump.c @@ -204,7 +204,7 @@ import_ownertrust( const char *fname ) any = 1; } } - else if( rc == -1 ) { /* not found: insert */ + else if (gpg_err_code (rc) == GPG_ERR_NOT_FOUND) { /* insert */ log_info("inserting ownertrust of %u\n", otrust ); memset (&rec, 0, sizeof rec); rec.recnum = tdbio_new_recnum (); |