test/unit: fix scan-build errors in blobfs tests
fix 3 null pointer dereferences. Change-Id: I0f11b8e47b05d0e965cea75d7b064cc2c11645e3 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/423942 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
11ccf3be2c
commit
438b71d17e
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user