Skip to content

Commit

Permalink
Merge pull request nfs-ganesha#20 from sswen/duplex-13
Browse files Browse the repository at this point in the history
[rpc_dplx.c] initialize rpc_dplx_rec on creation.

we could piecewise initialize it, but I can't think of any legit reason not to memset it
  • Loading branch information
mattbenjamin committed Sep 6, 2016
2 parents 2eb2442 + edb3b7e commit cd28756
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/rpc_dplx.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,8 @@ rpc_dplx_init()
static inline struct rpc_dplx_rec *
alloc_dplx_rec(void)
{
struct rpc_dplx_rec *rec = mem_alloc(sizeof(struct rpc_dplx_rec));
struct rpc_dplx_rec *rec = mem_zalloc(sizeof(struct rpc_dplx_rec));

rec->refcnt = 0;
rec->hdl.xprt = NULL;
mutex_init(&rec->locktrace.mtx, NULL);
/* send channel */
rpc_dplx_lock_init(&rec->send.lock);
Expand Down

0 comments on commit cd28756

Please sign in to comment.