rx: Formatting fixes
authorAndrew Deason <adeason@sinenomine.net>
Wed, 1 Aug 2012 19:11:48 +0000 (15:11 -0400)
committerDerrick Brashear <shadow@dementix.org>
Fri, 3 Aug 2012 15:41:26 +0000 (08:41 -0700)
Some minor fixes to preprocessor indentation and other minor
formatting things in rx.c and rx_user.c.

Change-Id: Ia7bfda68b40893191a91ac9161cfe513a83c1989
Reviewed-on: http://gerrit.openafs.org/7923
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/rx/rx.c
src/rx/rx_user.c

index 6e0b367..53db0a3 100644 (file)
@@ -6163,11 +6163,11 @@ rxi_Send(struct rx_call *call, struct rx_packet *p,
  * haveCTLock Set if calling from rxi_ReapConnections
  */
 #ifdef RX_ENABLE_LOCKS
-int
-static rxi_CheckCall(struct rx_call *call, int haveCTLock)
+static int
+rxi_CheckCall(struct rx_call *call, int haveCTLock)
 #else /* RX_ENABLE_LOCKS */
-int
-static rxi_CheckCall(struct rx_call *call)
+static int
+rxi_CheckCall(struct rx_call *call)
 #endif                         /* RX_ENABLE_LOCKS */
 {
     struct rx_connection *conn = call->conn;
@@ -6222,31 +6222,31 @@ static rxi_CheckCall(struct rx_call *call)
     if (now > (call->lastReceiveTime + deadTime)) {
        if (call->state == RX_STATE_ACTIVE) {
 #ifdef ADAPT_PMTU
-#if defined(KERNEL) && defined(AFS_SUN5_ENV)
+# if defined(KERNEL) && defined(AFS_SUN5_ENV)
            ire_t *ire;
-#if defined(AFS_SUN510_ENV) && defined(GLOBAL_NETSTACKID)
-           netstack_t *ns =  netstack_find_by_stackid(GLOBAL_NETSTACKID);
+#  if defined(AFS_SUN510_ENV) && defined(GLOBAL_NETSTACKID)
+           netstack_t *ns = netstack_find_by_stackid(GLOBAL_NETSTACKID);
            ip_stack_t *ipst = ns->netstack_ip;
-#endif
+#  endif
            ire = ire_cache_lookup(conn->peer->host
-#if defined(AFS_SUN510_ENV) && defined(ALL_ZONES)
+#  if defined(AFS_SUN510_ENV) && defined(ALL_ZONES)
                                   , ALL_ZONES
-#if defined(AFS_SUN510_ENV) && (defined(ICL_3_ARG) || defined(GLOBAL_NETSTACKID))
+#    if defined(ICL_3_ARG) || defined(GLOBAL_NETSTACKID)
                                   , NULL
-#if defined(AFS_SUN510_ENV) && defined(GLOBAL_NETSTACKID)
+#     if defined(GLOBAL_NETSTACKID)
                                   , ipst
-#endif
-#endif
-#endif
+#     endif
+#    endif
+#  endif
                );
 
            if (ire && ire->ire_max_frag > 0)
                rxi_SetPeerMtu(NULL, conn->peer->host, 0,
                               ire->ire_max_frag);
-#if defined(GLOBAL_NETSTACKID)
+#  if defined(GLOBAL_NETSTACKID)
            netstack_rele(ns);
-#endif
-#endif
+#  endif
+# endif
 #endif /* ADAPT_PMTU */
            cerror = RX_CALL_DEAD;
            goto mtuout;
index b52f6bd..c55949e 100644 (file)
 # endif
 
 #if defined(HAVE_LINUX_ERRQUEUE_H) && defined(ADAPT_PMTU)
-#include <linux/types.h>
-#include <linux/errqueue.h>
-#ifndef IP_MTU
-#define IP_MTU 14
-#endif
+# include <linux/types.h>
+# include <linux/errqueue.h>
+# ifndef IP_MTU
+#  define IP_MTU 14
+# endif
 #endif
 
 #include "rx.h"
@@ -94,12 +94,12 @@ rxi_GetHostUDPSocket(u_int ahost, u_short port)
     struct sockaddr_in taddr;
     char *name = "rxi_GetUDPSocket: ";
 #ifdef AFS_LINUX22_ENV
-#if defined(ADAPT_PMTU)
-    int pmtu=IP_PMTUDISC_WANT;
-    int recverr=1;
-#else
-    int pmtu=IP_PMTUDISC_DONT;
-#endif
+# if defined(ADAPT_PMTU)
+    int pmtu = IP_PMTUDISC_WANT;
+    int recverr = 1;
+# else
+    int pmtu = IP_PMTUDISC_DONT;
+# endif
 #endif
 
 #if !defined(AFS_NT40_ENV)
@@ -728,11 +728,11 @@ rxi_InitPeerParams(struct rx_peer *pp)
                 pp->ifMTU = MIN(mtu - RX_IPUDP_SIZE, pp->ifMTU);
             }
         }
-#ifdef AFS_NT40_ENV
+# ifdef AFS_NT40_ENV
         closesocket(sock);
-#else
+# else
         close(sock);
-#endif
+# endif
     }
 #endif
     pp->ifMTU = rxi_AdjustIfMTU(pp->ifMTU);
@@ -810,8 +810,8 @@ rxi_HandleSocketError(int socket)
     }
     if (!cmsg)
         goto out;
-    ret=1;
-    err =(struct sock_extended_err *) CMSG_DATA(cmsg);
+    ret = 1;
+    err = (struct sock_extended_err *) CMSG_DATA(cmsg);
 
     if (err->ee_errno == EMSGSIZE && err->ee_info >= 68) {
        rxi_SetPeerMtu(NULL, addr.sin_addr.s_addr, addr.sin_port,