nvmf/tcp: remove redundant memset
Minor optimisation done by code analysis, both cmd and dif are overridden in TCP_REQUEST_STATE_NEW. Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com> Change-Id: I6bae4ddae175035d029c0693f7e4351b95a296ab Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478604 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
66af6221a0
commit
5b87daa92f
@ -358,13 +358,12 @@ spdk_nvmf_tcp_req_get(struct spdk_nvmf_tcp_qpair *tqpair)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memset(&tcp_req->cmd, 0, sizeof(tcp_req->cmd));
|
||||
memset(&tcp_req->rsp, 0, sizeof(tcp_req->rsp));
|
||||
tcp_req->next_expected_r2t_offset = 0;
|
||||
tcp_req->r2tl_remain = 0;
|
||||
tcp_req->c2h_data_offset = 0;
|
||||
tcp_req->has_incapsule_data = false;
|
||||
memset(&tcp_req->req.dif, 0, sizeof(tcp_req->req.dif));
|
||||
tcp_req->req.dif.dif_insert_or_strip = false;
|
||||
|
||||
spdk_nvmf_tcp_req_set_state(tcp_req, TCP_REQUEST_STATE_NEW);
|
||||
return tcp_req;
|
||||
|
Loading…
Reference in New Issue
Block a user