Skip to content

Commit

Permalink
Initialize pCount to zero for zesDriverGet
Browse files Browse the repository at this point in the history
Signed-off-by: Bellekallu Rajkiran <[email protected]>
  • Loading branch information
bellekal committed Jul 7, 2024
1 parent c99886b commit c984b04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conformance_tests/sysman/test_sysman_init/src/test_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ TEST(SysmanInitTests,
TEST(SysmanInitTests,
GivenCoreNotInitializedWhenSysmanInitializedThenzesDriverGetWorks) {
ASSERT_EQ(ZE_RESULT_SUCCESS, zesInit(0));
uint32_t pCount;
uint32_t pCount = 0;
ASSERT_EQ(ZE_RESULT_SUCCESS, zesDriverGet(&pCount, nullptr));
ASSERT_GT(pCount, 0);
}
Expand All @@ -55,7 +55,7 @@ TEST(SysmanInitTests,
static char sys_env[] = "ZES_ENABLE_SYSMAN=1";
putenv(sys_env);
ASSERT_EQ(ZE_RESULT_SUCCESS, zeInit(0));
uint32_t pCount;
uint32_t pCount = 0;
ASSERT_EQ(ZE_RESULT_SUCCESS, zesDriverGet(&pCount, nullptr));
ASSERT_GT(pCount, 0);
}
Expand Down

0 comments on commit c984b04

Please sign in to comment.