mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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>
This commit is contained in:
parent
f170240ef7
commit
a4a15195c2
4 changed files with 71 additions and 66 deletions
|
@ -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 ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue