From e11eb503790015d817b031f9c15ce13050d836ee Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 10 Jul 2009 18:14:21 +0100 Subject: [PATCH] Tidy up the rx directory Give functions that need them return values Add prototyping for server_proc and rx_ts_tinfo_init Make debug functions only build when RXDEBUG is enabled Reviewed-on: http://gerrit.openafs.org/61 Reviewed-by: Derrick Brashear Verified-by: Derrick Brashear --- src/rx/rx.c | 2 ++ src/rx/rx_pthread.c | 11 +++++++---- src/rx/xdr_arrayn.c | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/rx/rx.c b/src/rx/rx.c index 2e0a0ebc1..c49a0a21b 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -3623,6 +3623,7 @@ rxi_UpdatePeerReach(struct rx_connection *conn, struct rx_call *acall) MUTEX_EXIT(&conn->conn_data_lock); } +#if defined(RXDEBUG) && defined(AFS_NT40_ENV) static const char * rx_ack_reason(int reason) { @@ -3649,6 +3650,7 @@ rx_ack_reason(int reason) return "unknown!!"; } } +#endif /* rxi_ComputePeerNetStats diff --git a/src/rx/rx_pthread.c b/src/rx/rx_pthread.c index 04c75114a..d0cd33185 100644 --- a/src/rx/rx_pthread.c +++ b/src/rx/rx_pthread.c @@ -95,11 +95,11 @@ rxi_InitializeThreadSupport(void) static void * server_entry(void *argp) { - void (*server_proc) () = (void (*)())argp; - server_proc(); + void (*server_proc) (void *) = (void (*)(void *))argp; + server_proc(NULL); dpf(("rx_pthread.c: server_entry: Server proc returned unexpectedly\n")); exit(1); - return (void *)0; + return NULL; } /* @@ -190,6 +190,7 @@ event_handler(void *argp) #endif rx_pthread_event_rescheduled = 0; } + return NULL; } @@ -270,6 +271,7 @@ rx_ListenerProc(void *argp) /* assert(sock != OSI_NULLSOCKET); */ } /* not reached */ + return NULL; } /* This is the server process request loop. The server process loop @@ -317,6 +319,7 @@ rx_ServerProc(void * dummy) /* assert(newcall != NULL); */ } /* not reached */ + return NULL; } /* @@ -441,7 +444,7 @@ rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags) return 0; } -struct rx_ts_info_t * rx_ts_info_init() { +struct rx_ts_info_t * rx_ts_info_init(void) { struct rx_ts_info_t * rx_ts_info; rx_ts_info = (rx_ts_info_t *) malloc(sizeof(rx_ts_info_t)); assert(rx_ts_info != NULL && pthread_setspecific(rx_ts_info_key, rx_ts_info) == 0); diff --git a/src/rx/xdr_arrayn.c b/src/rx/xdr_arrayn.c index 7da51b4f7..40d0d0cc0 100644 --- a/src/rx/xdr_arrayn.c +++ b/src/rx/xdr_arrayn.c @@ -59,6 +59,7 @@ #endif #else #include +#include #endif #include "xdr.h" -- 2.39.5