Use calloc, rather than malloc/memset
[openafs.git] / src / rx / rx_pthread.c
index bf5cbe6..a8a8ef0 100644 (file)
@@ -431,9 +431,8 @@ rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags)
 
 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));
+    rx_ts_info = calloc(1, sizeof(rx_ts_info_t));
     osi_Assert(rx_ts_info != NULL && pthread_setspecific(rx_ts_info_key, rx_ts_info) == 0);
-    memset(rx_ts_info, 0, sizeof(rx_ts_info_t));
 #ifdef RX_ENABLE_TSFPQ
     queue_Init(&rx_ts_info->_FPQ);