]> granicus.if.org Git - neomutt/commitdiff
tidy pre-processor defs
authorRichard Russon <rich@flatcap.org>
Tue, 20 Aug 2019 18:31:24 +0000 (19:31 +0100)
committerRichard Russon <rich@flatcap.org>
Wed, 21 Aug 2019 13:12:07 +0000 (14:12 +0100)
conn/ssl.c
ncrypt/crypt_gpgme.c

index 3af1887017f24a614a6e65689c87cd7506f9dbb6..872a9b1c975610679c7340e315566ecc749d8ed5 100644 (file)
@@ -76,8 +76,8 @@ const int dialog_row_len = 128;
 
 /* LibreSSL defines OPENSSL_VERSION_NUMBER but sets it to 0x20000000L.
  * So technically we don't need the defined(OPENSSL_VERSION_NUMBER) check.  */
-#if (defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10100000L) || \
-    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
+#if (defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER < 0x10100000L)) || \
+    (defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x2070000fL))
 #define X509_get0_notBefore X509_get_notBefore
 #define X509_get0_notAfter X509_get_notAfter
 #define X509_getm_notBefore X509_get_notBefore
@@ -610,7 +610,7 @@ static int ssl_init(void)
 
 /* OpenSSL performs automatic initialization as of 1.1.
  * However LibreSSL does not (as of 2.8.3). */
-#if (defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+#if (defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER < 0x10100000L)) || \
     (defined(LIBRESSL_VERSION_NUMBER))
   /* I don't think you can do this just before reading the error. The call
    * itself might clobber the last SSL error. */
index a7eec38cff641da39f7fadbca9c55b88d60c82ff..0661f5e3e0bf409ab7500a30cd4d90c3e3273c20 100644 (file)
@@ -1036,8 +1036,7 @@ static char *data_object_to_tempfile(gpgme_data_t data, FILE **fp_ret)
   return mutt_str_strdup(tempf);
 }
 
-#if GPGME_VERSION_NUMBER >= 0x010b00 /* gpgme >= 1.11.0 */
-
+#if (GPGME_VERSION_NUMBER >= 0x010b00) /* gpgme >= 1.11.0 */
 /**
  * create_recipient_string - Create a string of recipients
  * @param keylist    Keys, space-separated
@@ -1158,7 +1157,6 @@ static gpgme_key_t *create_recipient_set(const char *keylist, bool use_smime)
 
   return rset;
 }
-
 #endif /* GPGME_VERSION_NUMBER >= 0x010b00 */
 
 /**
@@ -1300,7 +1298,7 @@ static char *encrypt_gpgme_object(gpgme_data_t plaintext, char *keylist,
         goto cleanup;
     }
 
-#if GPGME_VERSION_NUMBER >= 0x010b00 /* gpgme >= 1.11.0 */
+#if (GPGME_VERSION_NUMBER >= 0x010b00) /* gpgme >= 1.11.0 */
     err = gpgme_op_encrypt_sign_ext(ctx, NULL, mutt_b2s(recpstring),
                                     GPGME_ENCRYPT_ALWAYS_TRUST, plaintext, ciphertext);
 #else
@@ -1309,7 +1307,7 @@ static char *encrypt_gpgme_object(gpgme_data_t plaintext, char *keylist,
   }
   else
   {
-#if GPGME_VERSION_NUMBER >= 0x010b00 /* gpgme >= 1.11.0 */
+#if (GPGME_VERSION_NUMBER >= 0x010b00) /* gpgme >= 1.11.0 */
     err = gpgme_op_encrypt_ext(ctx, NULL, mutt_b2s(recpstring),
                                GPGME_ENCRYPT_ALWAYS_TRUST, plaintext, ciphertext);
 #else