lib/nvme: Fix scanbuild issue about uninitialized value.
Issue:
nvme.c:766:2: warning: 4th function call argument is an uninitialized value
snprintf(trid->trstring, SPDK_NVMF_TRSTRING_MAX_LEN, "%s", trstring);
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1314 (master)
(cherry picked from commit 4a1ec34d3b
)
Change-Id: I4b0ae106ef8e4e72e80ec96d10010fddf8173144
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1371
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
136c0771ad
commit
1ffa3c3f08
@ -742,7 +742,7 @@ void
|
||||
spdk_nvme_trid_populate_transport(struct spdk_nvme_transport_id *trid,
|
||||
enum spdk_nvme_transport_type trtype)
|
||||
{
|
||||
const char *trstring;
|
||||
const char *trstring = "";
|
||||
|
||||
trid->trtype = trtype;
|
||||
switch (trtype) {
|
||||
|
Loading…
Reference in New Issue
Block a user