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: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-05-16 10:39:35 -07:00
parent dd27218532
commit 4a36aabd0c

View File

@ -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: