aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-pgp-context.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-pgp-context.c')
-rw-r--r--camel/camel-pgp-context.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/camel/camel-pgp-context.c b/camel/camel-pgp-context.c
index ebd8d4027a..13a94b449f 100644
--- a/camel/camel-pgp-context.c
+++ b/camel/camel-pgp-context.c
@@ -296,7 +296,7 @@ crypto_exec_with_passwd (const char *path, char *argv[], const char *input, int
*diagnostics = g_strdup_printf ("Couldn't create pipe to %s: "
"%s", path,
g_strerror (errno));
- return 0;
+ return -1;
}
if (!(child = fork ())) {
@@ -326,7 +326,7 @@ crypto_exec_with_passwd (const char *path, char *argv[], const char *input, int
} else if (child < 0) {
*diagnostics = g_strdup_printf ("Cannot fork %s: %s",
argv[0], g_strerror (errno));
- return 0;
+ return -1;
}
/* Parent */
@@ -1329,7 +1329,7 @@ pgp_decrypt (CamelCipherContext *ctx, CamelStream *istream,
g_free (passphrase);
/* gpg returns '1' if it succeedes in decrypting but can't verify the signature */
- if (!(retval == 0 || (context->priv->type == CAMEL_PGP_TYPE_GPG && retval == 1)) || !*plaintext) {
+ if (retval != 0 || (context->priv->type == CAMEL_PGP_TYPE_GPG && retval == 1) || !*plaintext) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
"%s", diagnostics);
g_free (plaintext);