Skip to content

Commit

Permalink
Fix #542, Avoid UT failure if SEM_VALUE_MAX = UINT32_MAX
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Dec 9, 2020
1 parent fa0cffa commit 3ef419d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unit-tests/oscore-test/ut_oscore_countsem_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void UT_os_count_sem_create_test()
* The OSAL should define this for itself, but it currently does not.
* (This macro is not currently defined in RTEMS)
*/
#ifdef SEM_VALUE_MAX
#if defined SEM_VALUE_MAX && SEM_VALUE_MAX < UINT32_MAX
res = OS_CountSemCreate(&count_sem_ids[0], "CountSem1", ((uint32)SEM_VALUE_MAX) + 1, 0);
if (res == OS_INVALID_SEM_VALUE)
UT_OS_TEST_RESULT(testDesc, UTASSERT_CASETYPE_PASS);
Expand Down

0 comments on commit 3ef419d

Please sign in to comment.