Commit 438b71d1 authored by Seth Howell's avatar Seth Howell Committed by Jim Harris
Browse files

test/unit: fix scan-build errors in blobfs tests



fix 3 null pointer dereferences.

Change-Id: I0f11b8e47b05d0e965cea75d7b064cc2c11645e3
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/423942


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 11ccf3be
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ fs_init(void)
	spdk_allocate_thread(_fs_send_msg, NULL, NULL, NULL, "thread0");

	spdk_fs_init(dev, NULL, NULL, fs_op_with_handle_complete, NULL);
	CU_ASSERT(g_fs != NULL);
	SPDK_CU_ASSERT_FATAL(g_fs != NULL);
	CU_ASSERT(g_fserrno == 0);
	fs = g_fs;

@@ -134,7 +134,7 @@ fs_open(void)
	spdk_allocate_thread(_fs_send_msg, NULL, NULL, NULL, "thread0");

	spdk_fs_init(dev, NULL, NULL, fs_op_with_handle_complete, NULL);
	CU_ASSERT(g_fs != NULL);
	SPDK_CU_ASSERT_FATAL(g_fs != NULL);
	CU_ASSERT(g_fserrno == 0);
	fs = g_fs;

+1 −0
Original line number Diff line number Diff line
@@ -317,6 +317,7 @@ fs_delete_file_without_close(void)

	rc = spdk_fs_open_file(g_fs, channel, "testfile", SPDK_BLOBFS_OPEN_CREATE, &g_file);
	CU_ASSERT(rc == 0);
	SPDK_CU_ASSERT_FATAL(g_file != NULL);

	rc = spdk_fs_delete_file(g_fs, channel, "testfile");
	CU_ASSERT(rc == 0);