From: Simon Wilkinson Date: Tue, 28 Sep 2010 23:21:43 +0000 (+0100) Subject: rx: Don't have different args for rxi_FreeCall X-Git-Tag: upstream/1.8.0_pre1^2~4744 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ff89a321108e1a0c08323547de706f953aef0430;p=packages%2Fo%2Fopenafs.git rx: Don't have different args for rxi_FreeCall rxi_FreeCall changes its number of arguments depending on whether locks are enabled or not. That's a little bit nasty to read, so just change it so that it always takes two arguments, and ignores the second when it doesn't need it. Change-Id: I5f869bea9bcf01bac16d8c5eec93373788d17978 Reviewed-on: http://gerrit.openafs.org/2863 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 0761018e2..73a5d5779 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -2374,13 +2374,8 @@ rxi_NewCall(struct rx_connection *conn, int channel) * Call is locked upon entry. * haveCTLock set if called from rxi_ReapConnections */ -#ifdef RX_ENABLE_LOCKS void rxi_FreeCall(struct rx_call *call, int haveCTLock) -#else /* RX_ENABLE_LOCKS */ -void -rxi_FreeCall(struct rx_call *call) -#endif /* RX_ENABLE_LOCKS */ { int channel = call->channel; struct rx_connection *conn = call->conn; @@ -5952,7 +5947,7 @@ rxi_CheckCall(struct rx_call *call) } return -1; #else /* RX_ENABLE_LOCKS */ - rxi_FreeCall(call); + rxi_FreeCall(call, 0); return -2; #endif /* RX_ENABLE_LOCKS */ } diff --git a/src/rx/rx_prototypes.h b/src/rx/rx_prototypes.h index 2fa0d52e7..ae75deaac 100644 --- a/src/rx/rx_prototypes.h +++ b/src/rx/rx_prototypes.h @@ -81,17 +81,10 @@ extern afs_int32 rx_EndCall(struct rx_call *call, afs_int32 rc); extern void rx_Finalize(void); extern void rxi_PacketsUnWait(void); extern struct rx_service *rxi_FindService(osi_socket socket, - u_short serviceId); + u_short serviceId); extern struct rx_call *rxi_NewCall(struct rx_connection *conn, - int channel); - -/* Don't like this - change source at some point to make calls identical */ -#ifdef RX_ENABLE_LOCKS + int channel); extern void rxi_FreeCall(struct rx_call *call, int haveCTLock); -#else /* RX_ENABLE_LOCKS */ -extern void rxi_FreeCall(struct rx_call *call); -#endif /* RX_ENABLE_LOCKS */ - extern void *rxi_Alloc(size_t size); extern void rxi_Free(void *addr, size_t size); extern void rxi_SetPeerMtu(struct rx_peer *peer, afs_uint32 host,