]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Tidy up the rx directory
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Fri, 10 Jul 2009 17:14:21 +0000 (18:14 +0100)
committerDerrick Brashear <shadow@dementia.org>
Sun, 12 Jul 2009 13:21:25 +0000 (07:21 -0600)
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 <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
src/rx/rx.c
src/rx/rx_pthread.c
src/rx/xdr_arrayn.c

index 2e0a0ebc17594d06cc21d2c59d482bc438d12341..c49a0a21bbeb6666cbf0e99cc1ef8bd0bb547bd4 100644 (file)
@@ -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
index 04c75114a4ba0fe698d81c0cd4e57f473bdc1cd9..d0cd33185a5dbaea09e0dffa51244119ef705fd9 100644 (file)
@@ -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);
index 7da51b4f7187d151b4deedf18679d4033953741a..40d0d0cc05ea77bb4458e574fcb019ab0ac1ed29 100644 (file)
@@ -59,6 +59,7 @@
 #endif
 #else
 #include <stdio.h>
+#include <string.h>
 #endif
 #include "xdr.h"