examples/nvme/identify: assert optarg to satisfy analyser
Despite spdk_nvme_transport_id_parse() checking optarg for NULL, then the Jenkins CI doing code-analysis fails with the error message: "Null pointer passed as an argument to a 'nonnull' parameter" This adds an assertion to satisfy the code-analysis. Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com> Change-Id: I35f7ee659624c1d5a2abda91bccac9fb58393063 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6068 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
f79d4b8baf
commit
1b0134e0a9
@ -1999,6 +1999,7 @@ parse_args(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
assert(optarg != NULL);
|
||||
hostnqn = strcasestr(optarg, "hostnqn:");
|
||||
if (hostnqn) {
|
||||
size_t len;
|
||||
|
Loading…
Reference in New Issue
Block a user