From afc308598d1ddaf20d54b4eab30b959066a4e5e6 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 3 Feb 2017 13:08:39 +0100 Subject: core: Minor cleanup of commit 195c735 * src/verify.c (parse_tofu_user): For cleanness use gpg_error ... (_gpgme_verify_status_handler): ... and gpg_err_code. Signed-off-by: Werner Koch --- src/verify.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/verify.c') diff --git a/src/verify.c b/src/verify.c index 398cec57..900f925d 100644 --- a/src/verify.c +++ b/src/verify.c @@ -685,7 +685,7 @@ parse_tofu_user (gpgme_signature_t sig, char *args, gpgme_protocol_t protocol) { /* GnuPG since 2.1.17 emits multiple TOFU_USER lines with different fingerprints in case of conflicts for a signature. */ - err = GPG_ERR_DUP_VALUE; + err = gpg_error (GPG_ERR_DUP_VALUE); goto leave; } @@ -1003,13 +1003,13 @@ _gpgme_verify_status_handler (void *priv, gpgme_status_code_t code, char *args) return trace_gpg_error (GPG_ERR_INV_ENGINE); err = parse_tofu_user (sig, args, ctx->protocol); /* gpg emits TOFU User lines for each conflicting key. - GPGME does not expose this to have a clean API and - a GPGME user can do a keylisting with the address - normalisation. - So when a duplicated TOFU_USER line is encountered - we ignore the conflicting tofu stats emited afterwards. - */ - if (err == GPG_ERR_DUP_VALUE) + * GPGME does not expose this to have a clean API and + * a GPGME user can do a keylisting with the address + * normalisation. + * So when a duplicated TOFU_USER line is encountered + * we ignore the conflicting tofu stats emited afterwards. + */ + if (gpg_err_code (err) == GPG_ERR_DUP_VALUE) { opd->conflict_user_seen = 1; break; -- cgit v1.2.3