[Pkg-gnupg-commit] [gnupg2] 88/241: gpg: Display the correct error message.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Dec 9 20:31:59 UTC 2015
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 641df615da4937b0073c420a0503c5810c237972
Author: Neal H. Walfield <neal at g10code.com>
Date: Thu Oct 29 10:09:58 2015 +0100
gpg: Display the correct error message.
* g10/trustdb.c (validate_keys): If tdbio_update_version_record fails,
RC does not contain the error code. Save the error code in rc2 and
use that.
--
Signed-off-by: Neal H. Walfield <neal at g10code.com>
---
g10/trustdb.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/g10/trustdb.c b/g10/trustdb.c
index 54a779e..64de985 100644
--- a/g10/trustdb.c
+++ b/g10/trustdb.c
@@ -2106,6 +2106,8 @@ validate_keys (int interactive)
release_key_hash_table (stored);
if (!rc && !quit) /* mark trustDB as checked */
{
+ int rc2;
+
if (next_expire == 0xffffffff || next_expire < start_time )
tdbio_write_nextcheck (0);
else
@@ -2115,11 +2117,12 @@ validate_keys (int interactive)
strtimestamp (next_expire));
}
- if(tdbio_update_version_record()!=0)
+ rc2 = tdbio_update_version_record ();
+ if (rc2)
{
- log_error(_("unable to update trustdb version record: "
- "write failed: %s\n"), gpg_strerror (rc));
- tdbio_invalid();
+ log_error (_("unable to update trustdb version record: "
+ "write failed: %s\n"), gpg_strerror (rc2));
+ tdbio_invalid ();
}
do_sync ();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list