src: Fix error handling.
authorJustus Winter <justus@g10code.com>
Fri, 8 Jul 2016 16:00:01 +0000 (18:00 +0200)
committerJustus Winter <justus@g10code.com>
Fri, 8 Jul 2016 16:03:36 +0000 (18:03 +0200)
* src/encrypt.c (encrypt_status_handler): Fix error handling, ||
conflates errors.

Signed-off-by: Justus Winter <justus@g10code.com>
src/encrypt.c

index 8672cd3..307c862 100644 (file)
@@ -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;
 }