RX: Can't assert a void result
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Fri, 11 Jun 2010 09:48:37 +0000 (10:48 +0100)
committerJeffrey Altman <jaltman@openafs.org>
Fri, 11 Jun 2010 11:59:21 +0000 (04:59 -0700)
We can't assert(MUTEX_DESTROY(blah) == 0) when the MUTEX_DESTROY
macro already returns void (and asserts), as it does in the
pthread case. This fixes the build failure introduced by
53c9258cd7300c03be3f3e50003cad3dfc59baf3

Change-Id: I0b7a30e785de3437f0c1e264b4a63c87f63b6783
Reviewed-on: http://gerrit.openafs.org/2120
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

src/rx/rx_globals.h

index 40a477d..68c4eab 100644 (file)
@@ -536,19 +536,11 @@ EXT afs_kmutex_t rx_connHashTable_lock;
 #define rxi_AllocSecurityObject() (struct rx_securityClass *) rxi_Alloc(sizeof(struct rx_securityClass))
 #define        rxi_FreeSecurityObject(obj) rxi_Free(obj, sizeof(struct rx_securityClass))
 #define        rxi_AllocService()      (struct rx_service *) rxi_Alloc(sizeof(struct rx_service))
-#ifdef AFS_PTHREAD_ENV
-#define        rxi_FreeService(obj) \
-do { \
-    assert(MUTEX_DESTROY(&(obj)->svc_data_lock)==0); \
-    rxi_Free((obj), sizeof(struct rx_service)); \
-} while (0)
-#else
 #define        rxi_FreeService(obj) \
 do { \
     MUTEX_DESTROY(&(obj)->svc_data_lock);  \
     rxi_Free((obj), sizeof(struct rx_service)); \
 } while (0)
-#endif
 #define        rxi_AllocPeer()         (struct rx_peer *) rxi_Alloc(sizeof(struct rx_peer))
 #define        rxi_FreePeer(peer)      rxi_Free(peer, sizeof(struct rx_peer))
 #define        rxi_AllocConnection()   (struct rx_connection *) rxi_Alloc(sizeof(struct rx_connection))