[exim-dev] misleading indent

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Andreas Metzler
Date:  
À: exim-dev
Sujet: [exim-dev] misleading indent
Hello,

gcc (correctly) warns about two instances of misleading indentation.

cu Andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
diff --git a/src/src/tls-gnu.c b/src/src/tls-gnu.c
index 03e704e39..196e62203 100644
--- a/src/src/tls-gnu.c
+++ b/src/src/tls-gnu.c
@@ -2827,23 +2827,23 @@ if (tls_init(host, ob->tls_certificate, ob->tls_privatekey,
     cipher_list, &state, tlsp, errstr) != OK)
   return FALSE;


+{
+int dh_min_bits = ob->tls_dh_min_bits;
+if (dh_min_bits < EXIM_CLIENT_DH_MIN_MIN_BITS)
   {
-  int dh_min_bits = ob->tls_dh_min_bits;
-  if (dh_min_bits < EXIM_CLIENT_DH_MIN_MIN_BITS)
-    {
-    DEBUG(D_tls)
-      debug_printf("WARNING: tls_dh_min_bits far too low,"
-            " clamping %d up to %d\n",
-      dh_min_bits, EXIM_CLIENT_DH_MIN_MIN_BITS);
-    dh_min_bits = EXIM_CLIENT_DH_MIN_MIN_BITS;
-    }
-
-  DEBUG(D_tls) debug_printf("Setting D-H prime minimum"
-            " acceptable bits to %d\n",
-      dh_min_bits);
-  gnutls_dh_set_prime_bits(state->session, dh_min_bits);
+  DEBUG(D_tls)
+    debug_printf("WARNING: tls_dh_min_bits far too low,"
+              " clamping %d up to %d\n",
+        dh_min_bits, EXIM_CLIENT_DH_MIN_MIN_BITS);
+  dh_min_bits = EXIM_CLIENT_DH_MIN_MIN_BITS;
   }


+DEBUG(D_tls) debug_printf("Setting D-H prime minimum"
+              " acceptable bits to %d\n",
+    dh_min_bits);
+gnutls_dh_set_prime_bits(state->session, dh_min_bits);
+}
+
 /* Stick to the old behaviour for compatibility if tls_verify_certificates is
 set but both tls_verify_hosts and tls_try_verify_hosts are unset. Check only
 the specified host patterns if one of them is defined */
diff --git a/src/src/transports/smtp_socks.c b/src/src/transports/smtp_socks.c
index 41dc78147..9446e2880 100644
--- a/src/src/transports/smtp_socks.c
+++ b/src/src/transports/smtp_socks.c
@@ -330,30 +330,30 @@ if (  buf[0] != 5
    )
   goto proxy_err;


- {
- union sockaddr_46 sin;
- (void) ip_addr(&sin, host_af, host->address, port);
+{
+union sockaddr_46 sin;
+(void) ip_addr(&sin, host_af, host->address, port);

- /* send connect (ipver, ipaddr, port) */
+/* send connect (ipver, ipaddr, port) */

-  buf[0] = 5; buf[1] = 1; buf[2] = 0; buf[3] = host_af == AF_INET6 ? 4 : 1;
-  #if HAVE_IPV6
-  if (host_af == AF_INET6)
-    {
-    memcpy(buf+4, &sin.v6.sin6_addr,       sizeof(sin.v6.sin6_addr));
-    memcpy(buf+4+sizeof(sin.v6.sin6_addr),
-      &sin.v6.sin6_port, sizeof(sin.v6.sin6_port));
-    size = 4+sizeof(sin.v6.sin6_addr)+sizeof(sin.v6.sin6_port);
-    }
-  else
-  #endif
-    {
-    memcpy(buf+4, &sin.v4.sin_addr.s_addr, sizeof(sin.v4.sin_addr.s_addr));
-    memcpy(buf+4+sizeof(sin.v4.sin_addr.s_addr),
-      &sin.v4.sin_port, sizeof(sin.v4.sin_port));
-    size = 4+sizeof(sin.v4.sin_addr.s_addr)+sizeof(sin.v4.sin_port);
-    }
+buf[0] = 5; buf[1] = 1; buf[2] = 0; buf[3] = host_af == AF_INET6 ? 4 : 1;
+#if HAVE_IPV6
+if (host_af == AF_INET6)
+  {
+  memcpy(buf+4, &sin.v6.sin6_addr,       sizeof(sin.v6.sin6_addr));
+  memcpy(buf+4+sizeof(sin.v6.sin6_addr),
+    &sin.v6.sin6_port, sizeof(sin.v6.sin6_port));
+  size = 4+sizeof(sin.v6.sin6_addr)+sizeof(sin.v6.sin6_port);
   }
+else
+#endif
+  {
+  memcpy(buf+4, &sin.v4.sin_addr.s_addr, sizeof(sin.v4.sin_addr.s_addr));
+  memcpy(buf+4+sizeof(sin.v4.sin_addr.s_addr),
+    &sin.v4.sin_port, sizeof(sin.v4.sin_port));
+  size = 4+sizeof(sin.v4.sin_addr.s_addr)+sizeof(sin.v4.sin_port);
+  }
+}


state = US"connect";
HDEBUG(D_transport|D_acl|D_v)