[gmime] Use g_set_error_literal where appropriate



commit 0cee8a597fcf6ed07e0ac2b007909c39ea35eeba
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date:   Tue Mar 14 16:02:40 2017 -0400

    Use g_set_error_literal where appropriate

 gmime/gmime-crypto-context.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/gmime/gmime-crypto-context.c b/gmime/gmime-crypto-context.c
index 1d6a11f..0672e0a 100644
--- a/gmime/gmime-crypto-context.c
+++ b/gmime/gmime-crypto-context.c
@@ -352,8 +352,8 @@ static int
 crypto_sign (GMimeCryptoContext *ctx, gboolean detach, const char *userid,
             GMimeStream *istream, GMimeStream *ostream, GError **err)
 {
-       g_set_error (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED,
-                    "Signing is not supported by this crypto context");
+       g_set_error_literal (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED,
+                            "Signing is not supported by this crypto context");
        
        return -1;
 }
@@ -388,8 +388,8 @@ static GMimeSignatureList *
 crypto_verify (GMimeCryptoContext *ctx, GMimeVerifyFlags flags, GMimeStream *istream, GMimeStream *sigstream,
               GMimeStream *ostream, GError **err)
 {
-       g_set_error (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED,
-                    "Verifying is not supported by this crypto context");
+       g_set_error_literal (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED,
+                            "Verifying is not supported by this crypto context");
        
        return NULL;
 }
@@ -428,8 +428,8 @@ static int
 crypto_encrypt (GMimeCryptoContext *ctx, gboolean sign, const char *userid, GMimeEncryptFlags flags,
                GPtrArray *recipients, GMimeStream *istream, GMimeStream *ostream, GError **err)
 {
-       g_set_error (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED,
-                    "Encryption is not supported by this crypto context");
+       g_set_error_literal (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED,
+                            "Encryption is not supported by this crypto context");
        
        return -1;
 }
@@ -467,8 +467,8 @@ static GMimeDecryptResult *
 crypto_decrypt (GMimeCryptoContext *ctx, GMimeDecryptFlags flags, const char *session_key,
                GMimeStream *istream, GMimeStream *ostream, GError **err)
 {
-       g_set_error (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED,
-                    "Decryption is not supported by this crypto context");
+       g_set_error_literal (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED,
+                            "Decrysption is not supported by this crypto context");
        
        return NULL;
 }
@@ -521,8 +521,8 @@ g_mime_crypto_context_decrypt (GMimeCryptoContext *ctx, GMimeDecryptFlags flags,
 static int
 crypto_import_keys (GMimeCryptoContext *ctx, GMimeStream *istream, GError **err)
 {
-       g_set_error (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED,
-                    "You may not import keys with this crypto");
+       g_set_error_literal (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED,
+                            "You may not import keys with this crypto");
        
        return -1;
 }
@@ -553,8 +553,8 @@ static int
 crypto_export_keys (GMimeCryptoContext *ctx, const char *keys[],
                    GMimeStream *ostream, GError **err)
 {
-       g_set_error (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED,
-                    "You may not export keys with this crypto");
+       g_set_error_literal (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED,
+                            "You may not export keys with this crypto");
        
        return -1;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]