From de74fe59feef9adc858ac04004880bfd44315d0d Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Fri, 8 Jul 2016 18:00:01 +0200 Subject: [PATCH] src: Fix error handling. * src/encrypt.c (encrypt_status_handler): Fix error handling, || conflates errors. Signed-off-by: Justus Winter --- src/encrypt.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/encrypt.c b/src/encrypt.c index 8672cd36..307c862b 100644 --- a/src/encrypt.c +++ b/src/encrypt.c @@ -184,8 +184,13 @@ encrypt_sym_status_handler (void *priv, gpgme_status_code_t code, char *args) static gpgme_error_t encrypt_status_handler (void *priv, gpgme_status_code_t code, char *args) { - return _gpgme_progress_status_handler (priv, code, args) - || _gpgme_encrypt_status_handler (priv, code, args); + gpgme_error_t err; + + err = _gpgme_progress_status_handler (priv, code, args); + if (!err) + err = _gpgme_encrypt_status_handler (priv, code, args); + + return err; }