nvme_perf: Remove unnecessary zeroing the buffer by memset
Change-Id: I503eb154a1c4fd8ddb5b37855cd84b65118b70af Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/c/441269 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Arshad Hussain <arshad.super@gmail.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
21b049f939
commit
307631e10a
@ -1272,7 +1272,6 @@ add_trid(const char *trid_str)
|
||||
}
|
||||
|
||||
trid = &trid_entry->trid;
|
||||
memset(trid, 0, sizeof(*trid));
|
||||
trid->trtype = SPDK_NVME_TRANSPORT_PCIE;
|
||||
snprintf(trid->subnqn, sizeof(trid->subnqn), "%s", SPDK_NVMF_DISCOVERY_NQN);
|
||||
|
||||
@ -1733,11 +1732,10 @@ associate_workers_with_ns(void)
|
||||
break;
|
||||
}
|
||||
|
||||
ns_ctx = malloc(sizeof(struct ns_worker_ctx));
|
||||
ns_ctx = calloc(1, sizeof(struct ns_worker_ctx));
|
||||
if (!ns_ctx) {
|
||||
return -1;
|
||||
}
|
||||
memset(ns_ctx, 0, sizeof(*ns_ctx));
|
||||
|
||||
printf("Associating %s with lcore %d\n", entry->name, worker->lcore);
|
||||
ns_ctx->min_tsc = UINT64_MAX;
|
||||
|
Loading…
Reference in New Issue
Block a user