]> git.notmuchmail.org Git - notmuch/commitdiff
crypto: _notmuch_crypto_cleanup should return void
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 10 Oct 2017 05:49:04 +0000 (01:49 -0400)
committerDavid Bremner <david@tethera.net>
Fri, 13 Oct 2017 01:11:55 +0000 (22:11 -0300)
There's no chance that _notmuch_crypto_cleanup() will ever return
anything other than 0, and no one ever checks its return value anyway.
So make it return void instead of int.

crypto.c
notmuch-client.h

index fc7c5d1d3376aa7e1bed35f355d3eabbf34a1404..4c1b7eeca6cb56575d01ddb10c3310e829fec46d 100644 (file)
--- a/crypto.c
+++ b/crypto.c
@@ -117,7 +117,7 @@ _notmuch_crypto_get_gmime_context (_notmuch_crypto_t *crypto, const char *protoc
     return NULL;
 }
 
-int
+void
 _notmuch_crypto_cleanup (_notmuch_crypto_t *crypto)
 {
     if (crypto->gpgctx) {
@@ -129,12 +129,9 @@ _notmuch_crypto_cleanup (_notmuch_crypto_t *crypto)
        g_object_unref (crypto->pkcs7ctx);
        crypto->pkcs7ctx = NULL;
     }
-
-    return 0;
 }
 #else
-int _notmuch_crypto_cleanup (unused(_notmuch_crypto_t *crypto))
+void _notmuch_crypto_cleanup (unused(_notmuch_crypto_t *crypto))
 {
-    return 0;
 }
 #endif
index 62acc70ea9f73e7bab096649c41f5606a8211aa5..bdcfd893e819cf89776730a8242bcf65232cef36 100644 (file)
@@ -185,7 +185,7 @@ GMimeCryptoContext *
 _notmuch_crypto_get_gmime_context (_notmuch_crypto_t *crypto, const char *protocol);
 #endif
 
-int
+void
 _notmuch_crypto_cleanup (_notmuch_crypto_t *crypto);
 
 int