Skip to content

Commit a4ab153

Browse files
committed
Fix setting size of DEVDAX from environment
Fix setting size of DEVDAX from environment. It fixes the Coverity issue no. 469373 and 469374. Signed-off-by: Lukasz Dorau <[email protected]>
1 parent e395dbb commit a4ab153

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

test/ipc_devdax_prov_consumer.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ int main(int argc, char *argv[]) {
3636
umf_devdax_memory_provider_params_t devdax_params =
3737
umfDevDaxMemoryProviderParamsDefault(
3838
getenv("UMF_TESTS_DEVDAX_PATH"),
39-
atol(getenv("UMF_TESTS_DEVDAX_SIZE")));
39+
atol(getenv("UMF_TESTS_DEVDAX_SIZE")
40+
? getenv("UMF_TESTS_DEVDAX_SIZE")
41+
: "0"));
4042

4143
return run_consumer(port, umfDevDaxMemoryProviderOps(), &devdax_params,
4244
memcopy, NULL);

test/ipc_devdax_prov_producer.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ int main(int argc, char *argv[]) {
3636
umf_devdax_memory_provider_params_t devdax_params =
3737
umfDevDaxMemoryProviderParamsDefault(
3838
getenv("UMF_TESTS_DEVDAX_PATH"),
39-
atol(getenv("UMF_TESTS_DEVDAX_SIZE")));
39+
atol(getenv("UMF_TESTS_DEVDAX_SIZE")
40+
? getenv("UMF_TESTS_DEVDAX_SIZE")
41+
: "0"));
4042

4143
return run_producer(port, umfDevDaxMemoryProviderOps(), &devdax_params,
4244
memcopy, NULL);

0 commit comments

Comments
 (0)