Commit 4a36aabd authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

nvme_qpair: add sanity-check asserts to print_command



Document the requirement that qpair and cmd can't be NULL.

This placates clang, which previously generated a warning
during scan-build.

Change-Id: Ic2d5e808faee0028c890ce1312444fb3dc95f223
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent dd272185
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -115,7 +115,8 @@ static void
nvme_io_qpair_print_command(struct spdk_nvme_qpair *qpair,
			    struct spdk_nvme_cmd *cmd)
{

	nvme_assert(qpair != NULL, ("print_command: qpair == NULL\n"));
	nvme_assert(cmd != NULL, ("print_command: cmd == NULL\n"));
	switch ((int)cmd->opc) {
	case SPDK_NVME_OPC_WRITE:
	case SPDK_NVME_OPC_READ: