From: Andrew Deason Date: Wed, 1 Aug 2012 19:11:48 +0000 (-0400) Subject: rx: Formatting fixes X-Git-Tag: upstream/1.8.0_pre1^2~2119 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3cf4c1fbad712984074a916897b77841c3e24752;p=packages%2Fo%2Fopenafs.git rx: Formatting fixes 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 Reviewed-by: Derrick Brashear --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 6e0b3672d..53db0a3f5 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -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; diff --git a/src/rx/rx_user.c b/src/rx/rx_user.c index b52f6bddc..c55949e2b 100644 --- a/src/rx/rx_user.c +++ b/src/rx/rx_user.c @@ -37,11 +37,11 @@ # endif #if defined(HAVE_LINUX_ERRQUEUE_H) && defined(ADAPT_PMTU) -#include -#include -#ifndef IP_MTU -#define IP_MTU 14 -#endif +# include +# include +# 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,